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

Vaadin ComboBox Filter timeout #6863

Open
Aleksey2093 opened this issue Nov 25, 2024 · 2 comments
Open

Vaadin ComboBox Filter timeout #6863

Aleksey2093 opened this issue Nov 25, 2024 · 2 comments
Labels
enhancement New feature or request vaadin-combo-box

Comments

@Aleksey2093
Copy link

Aleksey2093 commented Nov 25, 2024

this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => {
if (serverFacade.getLastFilterSentToServer() === params.filter) {
// Fixes the case when the filter changes
// to something else and back to the original value
// within debounce timeout, and the
// DataCommunicator thinks it doesn't need to send data
serverFacade.needsDataCommunicatorReset();
}

I have a very long query for DataProvider. It is necessary that the filter does not react immediately when entering and allows the user to enter more characters. 500 milliseconds is very short. You need to be able to change this parameter using "getElement().setProperty(...."

vaadin 23.3.33

@Aleksey2093 Aleksey2093 changed the title kjh Vaadin ComboBox Filter timeout Nov 25, 2024
@web-padawan
Copy link
Member

Related to #1031

@Aleksey2093
Copy link
Author

Aleksey2093 commented Nov 25, 2024

to connector.js

            let timerValue = 1000
            if (comboBox.filterDebouncerTimer) {
              timerValue = comboBox.filterDebouncerTimer
            }
            this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(timerValue), () => {

to java

combobox.getElement().setProperty("filterDebouncerTimer", "5000")

Can it be done like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaadin-combo-box
Projects
None yet
Development

No branches or pull requests

3 participants