LeanAdmin / feature-discussions

The place for discussing new features
6 stars 0 forks source link

Tags field #6

Open stancl opened 3 years ago

stancl commented 3 years ago

Styled approximately like this:

Screen Shot 2021-01-02 at 1 59 07

https://play.tailwindcss.com/h18rQ9KCzY

You'd have a selection of tags to add and each tag can be removed by clicking the X button.

This could have some nice integrations with HasMany and JSON field (#5). Sometimes HasMany is used for simple things like these which makes it excessive. If HasMany were used, it would be a good idea to also have an input for adding tags, rather than just having a pre-determined selection of tags.

Also, there should be a good method for customizing how the values are stored. This would allow BelongsToMany support as well as many other things (= any other things).


So, the requirements I see:

molcsab commented 3 years ago

This is a must for me

viezel commented 3 years ago

Tags field are typically divided into 2 categories:

  1. input field to add tags to a model by typing multiple tags (what you are showing)
  2. a search field to find existing tags and apply (without creating new ones)

I would say both could be beneficial for Lean.