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

Update select.md #7022

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Update select.md #7022

wants to merge 3 commits into from

Conversation

smolinari
Copy link
Collaborator

Hope this is ok.

Scott

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

  • Bugfix
  • Feature
  • Documentation
  • 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 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:

@pdanpdan
Copy link
Collaborator

It's not good - the difference would be that filtering means selecting one/mode of the options in the list (even that means first adding the new option to the list) while autocomplete means completing the text you write with the text of the option in the list (but you can then delete/add some more text to it and use it as it is).
Autocomplete only works with text models.

@smolinari
Copy link
Collaborator Author

Ahh... ok. I'll edit it accordingly.

Scott

@smolinari
Copy link
Collaborator Author

@pdanpdan - Can you see if it is correct now? Thanks for helping out.

Scott

@pdanpdan
Copy link
Collaborator

The intended difference between a filtering QSelect and an autocomplete QSelect is that the former only allows setting the model to options from the list of available options (even if that means first adding the new option to the list), while the latter allows setting the model to something that is not in the list (picking an option from the list only fills the model with the content of the option).
As a consequence of this an autocomplete can only be performed on text models and options.

@@ -140,6 +140,12 @@ You can dynamically load new options when scroll reaches the end:

## Filtering and autocomplete

### Understanding the difference

The intended difference between a filtering QSelect and an autocomplete QSelect is offering the user a set of options that could be the full intended text to be entered (autocomplete), or removing options in the selection according to the input by the user (filter).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still confusing. Here's my suggestion:

The intended difference between a filtering QSelect and an autocomplete QSelect is that autocomplete allows you the model to accept a value that is not in the list of options, without adding it to the list. Filter on the other hand will result in a null or default value for the model if an option is not selected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be good the technical part below. The first paragraph is what the user should expect, The second the developer.

Scott

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.

None yet

3 participants