You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using dynamictags, each time you add an element, it is always inserted at the end. You could programmatically change the order (for example, alphabetical) with listeners to on-update but this would limit the reordering to only a set of rules that the developer implemented.
What I propose is a property on DynamicTags draggable which would enable the user to move around tags as they want them to be ordered. For example, in a paper, the authors are usually ordered by order of contribution so you can't programmatically apply a rule for ordering them, only the user can order correctly the authors.
Today, if you wrote the wrong tag or ordered it incorrectly, as a user you need to remove every tag after it and insert them back correctly. It's a tedious task.
This is not entirely related to #501 since DynamicTags doesn't possess a filterOption as Select has.
Suggested solution
As suggested above, we could add a property draggable in order to make tags possible to move around. Tags should only be able to move in their own component (moving tags across dynamictags component would be out of scope of this issue).
When dragging a tag, a visual cue that you are moving it should be displayed. For example, it could be a grayed/transparent tag moving in the list of tags.
In order to know where a tag should be moved when dropped, it might be necessary to register all x,y positions of each tag at the start of the drag. Then, when dragging, check the position of the mouse in order to know where to move the visual cue between the tags.
Alternative
IntersectionObserver could also be used instead of x,y positions.
Clear and concise description of the problem
When using dynamictags, each time you add an element, it is always inserted at the end. You could programmatically change the order (for example, alphabetical) with listeners to on-update but this would limit the reordering to only a set of rules that the developer implemented.
What I propose is a property on DynamicTags
draggable
which would enable the user to move around tags as they want them to be ordered. For example, in a paper, the authors are usually ordered by order of contribution so you can't programmatically apply a rule for ordering them, only the user can order correctly the authors.Today, if you wrote the wrong tag or ordered it incorrectly, as a user you need to remove every tag after it and insert them back correctly. It's a tedious task.
This is not entirely related to #501 since DynamicTags doesn't possess a filterOption as Select has.
Suggested solution
As suggested above, we could add a property
draggable
in order to make tags possible to move around. Tags should only be able to move in their own component (moving tags across dynamictags component would be out of scope of this issue).When dragging a tag, a visual cue that you are moving it should be displayed. For example, it could be a grayed/transparent tag moving in the list of tags.
In order to know where a tag should be moved when dropped, it might be necessary to register all x,y positions of each tag at the start of the drag. Then, when dragging, check the position of the mouse in order to know where to move the visual cue between the tags.
Alternative
IntersectionObserver could also be used instead of x,y positions.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: