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(Dropdown): editable search #475

Closed
wants to merge 1 commit into from
Closed

feat(Dropdown): editable search #475

wants to merge 1 commit into from

Conversation

dylankiss
Copy link
Contributor

@dylankiss dylankiss commented Sep 8, 2016

I added an extra property editableSearch that allows you to edit the search query of a Dropdown also after it previously lost focus.

How to use:

  1. Select an option in the dropdown. The dropdown will close.
  2. Click in the dropdown search input.
  3. Your search query is set to the current value and you can adapt the search query from here.

Use case: You have allowAdditions set to true. With editableSearch you can easily edit your custom value by clicking in the search input again and changing part of your value.

sep-08-2016 17-49-12

@codecov-io
Copy link

codecov-io commented Sep 8, 2016

Current coverage is 98.62% (diff: 100%)

Merging #475 into master will increase coverage by <.01%

@@             master       #475   diff @@
==========================================
  Files           101        101          
  Lines          1444       1454    +10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1424       1434    +10   
  Misses           20         20          
  Partials          0          0          

Powered by Codecov. Last update bcfa683...9746e33

@levithomason
Copy link
Member

levithomason commented Sep 8, 2016

I'd like to wait for more community requests before implementing this into the core library, for two reasons.

  1. My intuition says this is more of an edge case than a common use case. So, it is probably best left to implement separately rather than in the core library.
  2. It is not a SUI Dropdown feature. Though we do add features beyond what SUI provides, I want to be cautious when deviating.

It's a bummer to write code and not have it implemented, sorry about that. One way to help prevent that is to first open up an issue asking about the feature. This way, the community and myself can weigh in before embarking. You can reference #416 as an example of hashing out features to figure out what code we should write. Hope this helps and thanks for all the contributions to date.

@dylankiss
Copy link
Contributor Author

dylankiss commented Sep 9, 2016

@levithomason I understand it is more of an edge case than something that will often be used. It is a feature that works well for us, but we might not have the right control available for what we want to do.

We basically need an autosuggest input field, but as far as I've seen there is no such thing in Stardust or Semantic UI. Would you allow a PR to add such functionality to Input or so? Or do you have other suggestions to achieve this? Thanks in advance!

EDIT: Looks like <Search /> might be more appropriate for our use case. I see that this feature is on the way in #424. Hope it will be ready soon ;)

@levithomason
Copy link
Member

levithomason commented Sep 9, 2016

Yes sir, there have multiple Dropdown feature requests that are actually Search requests. Once I clear the pending legacy component updates (#269), I'll focus on new components. If Search isn't merged by then, I suspect that will be one of my first.

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.

3 participants