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

Every filter is an autocomplete field #315

Open
berarma opened this issue Apr 16, 2023 · 5 comments
Open

Every filter is an autocomplete field #315

berarma opened this issue Apr 16, 2023 · 5 comments
Labels

Comments

@berarma
Copy link
Contributor

berarma commented Apr 16, 2023

When autocomplete is true, it forces every filter field to be an autocomplete select. It doesn't matter the name of the field or the field options set in the SearchManager or the ViewSearch listener.

Setting autocomplete to false solves the issue but this renders the option useless.

@ADmad
Copy link
Member

ADmad commented Apr 17, 2023

Have you tried setting the inputType data attribute for the field to "text" for the ones you want to be text? That's what the JS code checks for https://github.com/FriendsOfCake/crud-view/blob/master/webroot/js/local.js#L57

@ADmad
Copy link
Member

ADmad commented Apr 17, 2023

Sorry, I missed understood the issue. You can set the autocomplete config to false and then add autocomplete class to required fields to turn them into autocomplete widgets.

@berarma
Copy link
Contributor Author

berarma commented Apr 17, 2023

Sorry, I missed understood the issue. You can set the autocomplete config to false and then add autocomplete class to required fields to turn them into autocomplete widgets.

True, but then the autocomplete setting is useless unless every filter field must be autocomplete. Was that intended?

@ADmad
Copy link
Member

ADmad commented Apr 17, 2023

Not sure what the original author intended. But I agree the default doesn't make much sense.

@ADmad ADmad added the rfc label Apr 17, 2023
@ADmad
Copy link
Member

ADmad commented Apr 21, 2023

Given that the problem is circumvented by setting autocomplete to false, I am going to keep this unchanged for now. In any case all the options jugging for autocomplete belongs in a widget class instead of the listener. I have an open issue #272 for creating the widget since quite sometime but haven't got around to it.

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

No branches or pull requests

2 participants