Harvest-Dev / ng-select2

A select2 for Angular
MIT License
55 stars 32 forks source link

UX and Documentation issues #57

Open majora2007 opened 1 year ago

majora2007 commented 1 year ago

Here are a few things I'm noticing while using this library. This issue is here for discussion and any items I can take and raise a PR for.

  1. autoCreate by itself does not always ensure the search box is visible. I found you need to use displaySearchStatus=always. This is something I missed (the example documentation worked without this but in my app, it does not).
  2. updateEvent is triggering when autoCreateItem is emitted. I think it should be suppressed for this case. I need feedback here as remove option will emit an update, but for adding a new one, the value is of a string and not the underlying item.
  3. Search box could benefit from Placeholder to help the end user know. If no autocreate, then "Filter", else "Filter or create new item". This could help a ton for end users. Ideally we'd expose this as an input.
  4. autoCreate on adding can leave some empty state in the search box which doesn't show the remaining options unless search box is cleared out (this only happens in my app, not in example page)
  5. autoCreate mode might want a button to indicate to the user they can add (or an option that's not selectable to tell them they can add" image
majora2007 commented 1 year ago

@Zefling thoughts on item 2? I've started working on this to streamline the new feature.

Zefling commented 1 year ago

If the proposal is coherent and does not break the existing, you can propose an evolution. This is not a feature I personally need for the projects I work on. The component is already a fork of another project, I haven't really taken the time to review certain points that could clearly be improved.

  1. It's true that it's not super consistent with the documentation. I forgot this point.
  2. Perhaps the sending should be made more consistent indeed.
  3. Perhaps going up in the "selection" rather than the "dropdown" will be more consistent.
  4. If it's more consistent, I don't have a use case
  5. I like the proposal.