Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Relation field (tom-select) to display the dropdown input plugin and clear button by default #2816

Open
didix16 opened this issue Mar 21, 2024 · 0 comments
Assignees

Comments

@didix16
Copy link

didix16 commented Mar 21, 2024

Is your feature request related to a problem? Please describe.
Well I think it's not a problem at all but a user experience improvement. Now, when you have to change the value from a Relation field, you have to type after the already inserted value which is very strange in my opinion and for many of my end users application. Also they don't know if the input can be erased or not. They need to guess that using backspace can erase the content (only if the Relation has marked as allowEmpty, which I think it should be eraseable by default but that's another history)

Describe the solution you'd like
So a solution that I thought is that would be nice to modify the relation_controller.js to add the plugin dropdown-input which displays an input to type explicitly the value you want to search without polluting the final form element and is much clear and intuitive to the final user.

Additionally, I'll also add the 'clear_button' pluggin even if the select has no 'multiple' attribute so the user can see the cross indicating that the value can be erased.

Maybe you could add extra methods to Relation php class that controls those plugins, allowing the developers to choose which options want to be integrated/showed in the form control.

Additional context

imagen

What do you think @tabuna ?

Hope you can make those changes. Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants