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

QTree with no-selection-unset option set can't accept 0 as a key #14505

Closed
znfgnu opened this issue Sep 28, 2022 · 1 comment · Fixed by #14506
Closed

QTree with no-selection-unset option set can't accept 0 as a key #14505

znfgnu opened this issue Sep 28, 2022 · 1 comment · Fixed by #14506
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@znfgnu
Copy link

znfgnu commented Sep 28, 2022

What happened?

On my website I have QTree component that shows items tree. Items are differentiated by idx field that contains integer numbers starting from 0. The QTree also has v-model:selected property set to selectedItem. Since I added no-selection-unset property to QTree, after selecting item with idx of 0 , selectedItem contains null instead. After removing no-selection-unset everything works ok.

What did you expect to happen?

With no-selection-unset: After selecting item with key 0, selected model should contain 0 instead of null.

Reproduction URL

https://codepen.io/znfgnu/pen/xxjYqbp

How to reproduce?

  1. Go to reproduction link
  2. Try to select option "zero"
  3. Selected item below will turn to null instead of zero (other options work ok)

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

Components (quasar)

Platforms/Browsers

Firefox

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@rstoenescu
Copy link
Member

Fix will be available in Quasar v2.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@rstoenescu @znfgnu and others