Skip to content

Tags field #6

Open
Open
@stancl

Description

@stancl

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:

  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions