You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One can write their own workaround by inspecting the value in the change event. If it's null, use the first page ( or whatever you like ) as a fallback.
But this is not the ideal solution because now the application would try to load the data for page 1 but the user might want to modify the input before doing so.
⚠️ My app is using the pagination component but a few customers have a lot of pages and a quick jump would be nice so I'm also offering this option. If the pagination component offers something by default, please let me know ⚠️
The text was updated successfully, but these errors were encountered:
In general receiving null once the field is empty is a valid selection. You seem to have a niche use case when selection is required and you somehow have so many pages that VSelect is not good enough as users need better experience when searching for page with keyboard... It looks more like a feature request for some sort of :default-value='1' or mandatory='force'.
I can offer 2 workarounds. One is just a wrapper on VAutocomplete preventing null from being emitted The second is more complex. You may ignore the warnings about duplicate IDs, as they would be hopefully fixed in 3.8.x.
An alternative would be to have pure VSelect, but reduce amount of options to every hundred (i.e. 100, 200, 300, etc) assuming people browse/explore these pages and don't need the specific one 142nd that they remember from yesterday or something..
Environment
Vuetify Version: 3.7.5
Vue Version: 3.5.13
Browsers: Firefox 132.0
OS: Linux x86_64
Steps to reproduce
In the playground try to empty the autocomplete by pressing backspace.
You should see that the value of
currentPage
turns intonull
.Expected Behavior
I would expect the autocomplete to delay the model change until the user selects a valid value.
Actual Behavior
The autocomplete sets the value to null when emptied.
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
One can write their own workaround by inspecting the value in the change event. If it's null, use the first page ( or whatever you like ) as a fallback.
Workaround:
https://play.vuetifyjs.com/#eNptUtFK7DAQ/ZUhT13uukUulwtruyg+6YMKgi9WJHanayCdhHSyKqX/btK0uyv4UpqcM3POnMlzLzpX51fWrvYexVoUXe2UZeiQvQUtaVdWgrtKbCoCUK01jqEHh80SatNaz7iFARpnWqhE6FGJi4oitzbUMdTeOSR+kDuEMpZlfxeBMMOyNZ74vol4NxH+/Y+MI8cG7IaxjfgsmWULKDfQRxaEKvaO4Mo5+bWKVrIeNNKO39c/FVZ7qT3CsITsdQmKtvg59hn/4A+cJ2/DbKDxVLMyBIau30MWmBF+xE6LWVo18xWUZQnktT5gYYDj9JN0CeejxNH2dByS4u81k0QyV1GRpy2FnYRDiMZqyThuqNifhdRYKkK3uU6txgRBdWvoe7h9vL9bdewU7VTzlZ2oLWAYivy0fmooPZsYvEbG5FHLN9ThYcSySqS7tYo7CpeHfR2Q1mxRn43DBPxEcmZcersNEyTi08SbM0+kPLgp8pNZxbCMaY+fl28pnu/T
But this is not the ideal solution because now the application would try to load the data for page 1 but the user might want to modify the input before doing so.
The text was updated successfully, but these errors were encountered: