Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow custom value for QSelect and QDialogSelect #589

Merged

Conversation

pdanpdan
Copy link
Collaborator

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested with all Quasar themes
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

For select components sometimes one needs to provide a shorter or different custom value.
Like the number of selected items in case of a lot of options selected.

Unified the actualValue code in QSelect and QDialogSelect. Maybe it should be extracted in select-mixin.

@rstoenescu
Copy link
Member

Hi, let's find a better name for this prop and merge the PR. "custom-value" is a little bit confusing. Anyone got any ideas?

@smolinari
Copy link
Collaborator

Wouldn't this be something userland could do on their own with a computed property?

Scott

@pdanpdan
Copy link
Collaborator Author

pdanpdan commented Jun 1, 2017

It can be computed in userland, this is just the glue to allow it to be displayed. The name was a derivate of actualValue. Maybe the old staticLabel is better?

@rstoenescu
Copy link
Member

@pdanpdan Good 'ol staticLabel is not good too. It confuses the developer as its name makes you think it interferes with float-label or stack-label, which is not the case. How about naming it template? Does it sound good to you? I'm open to more suggestions.

@smolinari
Copy link
Collaborator

smolinari commented Jun 1, 2017

value-converter or value-conversion
alt-value or alternative-value
value-mutation

??? 😄

Scott

@rstoenescu
Copy link
Member

display-value ?

@smolinari
Copy link
Collaborator

Sounds good to me!

Scott

@rstoenescu
Copy link
Member

@pdanpdan does display-value sound good to you too?

@pdanpdan
Copy link
Collaborator Author

pdanpdan commented Jun 1, 2017

Yes, it sounds good.

@rstoenescu
Copy link
Member

Ok, then let's do it like this.

@rstoenescu rstoenescu merged commit 0cefba3 into quasarframework:dev Jun 2, 2017
@pdanpdan pdanpdan deleted the feature-QSelect-custom-value branch June 2, 2017 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants