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

[PATCH] add option to clear inputs when search is complete in SearchGeoportailParcelle #1027

Closed
Zeworxx opened this issue Feb 6, 2024 · 4 comments

Comments

@Zeworxx
Copy link

Zeworxx commented Feb 6, 2024

Hello,

I have added an option to clear inputs fields when search is complete in SearchGeoportailParcelle (patch attached).
Would you consider adding this into a future version?

Regards

add-autoclear-option-parcel-search.patch

@Viglino
Copy link
Owner

Viglino commented Feb 7, 2024

If you want to perform a special task on search, you have to do it in your own code using the parcelle event:

search.on('parcelle', () => search.setInput(''))

@Zeworxx
Copy link
Author

Zeworxx commented Feb 7, 2024

Hi,
Thanks for your answer.
Doing setInput('') as you suggest clears the input field, but does not hide/clear the autocomplete parcel list. This could be done by playing with css but seems better to do in SearchGeoportailParcelle itself.
What do you think?

Viglino added a commit that referenced this issue Feb 7, 2024
@Viglino
Copy link
Owner

Viglino commented Feb 7, 2024

You can use search._listParcelle([])
I've added a new search.clearParcelList method, more explicit...

@Zeworxx
Copy link
Author

Zeworxx commented Feb 8, 2024

Ok, thanks !

@Viglino Viglino closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants