Open
Description
Styled approximately like this:
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:
- UI that shows tags and lets you remove them by clicking an X icon on write views
- Having pre-defined values to select from (using a
<select>
, or by clicking the fields and making them go from gray to e.g. purple?) - An input for adding custom values
- A method for customizing how it's stored
- Supporting JSON-encoded arrays and some relations out of the box