Skip to content

Conversation

@super-seo
Copy link
Contributor

@super-seo super-seo commented Jan 15, 2022

Hi!
I changed the checks a bit, going back to my previous version (#12012). Because in your version it was impossible emit null (nothing happens if you click on the root element with key = null, after any other selected. if you click any element - you can't click back the root).

My if-else check for two options.
First, the old behavior always emits the value, as in the old logic, if there is no new option (when noSelectionUnset = false).
Otherwise, emit any value only if it has changed (when noSelectionUnset = true, new behavior).

What kind of change does this PR introduce?

  • [*] Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • [*] No

The PR fulfills these requirements:

  • [*] It's submitted to the dev branch (or v[X] branch)
  • [*] When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to start a new feature discussion first and wait for approval before working on it)

@super-seo super-seo changed the title Fix #7701 Fix #7701 with "noSelectionUnset" QTree can't emit null Jan 17, 2022
@rstoenescu rstoenescu merged commit 05f407a into quasarframework:dev Jan 17, 2022
rstoenescu added a commit that referenced this pull request Jan 17, 2022
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

Successfully merging this pull request may close these issues.

2 participants