-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
C: VDataTableServerT: bugFunctionality that does not work as intended/expectedFunctionality that does not work as intended/expected
Description
Environment
Vuetify Version: 3.8.8
Vue Version: 3.5.16
Browsers: Chrome 137.0.0.0
OS: Mac OS 10.15.7
Steps to reproduce
- Create a VDataTableServer with bound search
- Go to page 2
- Enter a search 'x'
- update:options will be fired with { page: 2, search: 'x' }
- update:options will be fired with { page: 1, search: 'x' }
Expected Behavior
If options watcher is going to change the data, it should not fire the watcher twice.
Actual Behavior
It fires the watcher twice, which can lead to double load.
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
in VDataTable/composables/options.ts:38
// Reset page when searching
if (oldOptions && oldOptions.search !== value.search) {
page.value = 1
return; // <----- the above will fire the watcher again, so don't emit
}
hohanov and joel-wenzel
Metadata
Metadata
Assignees
Labels
C: VDataTableServerT: bugFunctionality that does not work as intended/expectedFunctionality that does not work as intended/expected