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

Search Select Input Fix #13590

Merged
merged 3 commits into from
Jan 6, 2022
Merged

Search Select Input Fix #13590

merged 3 commits into from
Jan 6, 2022

Conversation

zofskeez
Copy link
Contributor

@zofskeez zofskeez commented Jan 6, 2022

There is an issue in the PowerSelect component where triggering the search input with the mousedown event will cause the input/content to immediately close, forcing the user to hold the mouse button down to interact. Changing to @eventType="click" fixes the issue but unfortunately the PowerSelectWithCreate component does not proxy that value to PowerSelect.

This PR addresses the issue by removing the ember-power-select-with-create and incorporating the necessary functionality into the SearchSelect component which now uses PowerSelect directly.

@zofskeez zofskeez added the ui label Jan 6, 2022
@zofskeez zofskeez added this to the 1.10 milestone Jan 6, 2022
@vercel vercel bot temporarily deployed to Preview – vault January 6, 2022 22:21 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 6, 2022 22:23 Inactive
@zofskeez
Copy link
Contributor Author

zofskeez commented Jan 6, 2022

I looked at adding test coverage but there are already 16 tests for this component, some of which cover the search and create functionality ported from ember-power-select-with-create which are passing for me after the last commit.

* power-select component. If doing this, `models` should not also be passed as that will overwrite the
* passed value.
* @param search {Func} - *Advanced usage* - Customizes how the power-select component searches for matches -
* @param {function} search - *Advanced usage* - Customizes how the power-select component searches for matches -
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for cleaning up the documentation!

@@ -22,17 +22,14 @@
{{/if}}
{{! template-lint-configure simple-unless "warn" }}
{{#unless (gte this.selectedOptions.length this.selectLimit)}}
<PowerSelectWithCreate
<PowerSelect
Copy link
Contributor

Choose a reason for hiding this comment

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

much cleaner, I like it!

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Great problem solving!

@zofskeez zofskeez merged commit 09d6d47 into main Jan 6, 2022
@zofskeez zofskeez deleted the ui/search-select-dropdown-fix branch January 6, 2022 23:34
heppu pushed a commit to heppu/vault that referenced this pull request Jan 13, 2022
* removes ember-power-select-with-create dep and updates search-select component

* adds changelog

* fixes matching when filtering options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants