molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
13 stars 16 forks source link

fix(directory): Partial selected state of a parent code is not cleared when deselecting all selected codes #3344

Open esthervanenckevort opened 7 months ago

esthervanenckevort commented 7 months ago

What version of EMX2 are you using (see footer) v10.34.2

Describe the bug When I select 'C18 Malignant Neoplasm' of the Colon in the 'Diagnosis Available' facet and then deselect it again the parent codes keep their partial selected state (blue box with a - symbol)

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://directory-emx2-acc.molgenis.net'
  2. Click on 'Diagnosis Available' and search for 'C18'
  3. Select 'C18 Malignant Neoplasm of the Colon'
  4. Deselect 'C18 Malignant Neoplasm of the Colon'

Expected behavior When deselecting the 'C18 Malignant Neoplasm of the Colon' code the parent codes should also be deselected if none of their children are selected.

Actual results The parent codes stay partially selected, see screenshot.

Screenshot 2024-02-02 at 11 18 43
chinook25 commented 4 months ago

This issue is currently 'on hold' because we want to investigate merging the tree component with the version of the catalogue and the component lib.

konstantina-gkp commented 4 months ago

After reproducing the issue, I noticed that when selecting the "C18" filter, the parents of that filter do not get a blue checkbox, only "-". diagnosis_filter_selecting

After deselecting the filter, the parents still have a "-" in their checkbox. diagnosis_filter_deselecting I assume that the filters need a blue checkbox in the first case and nothing when they are deselected?

esthervanenckevort commented 4 months ago

The partial selected state in the first case is correct. It is an indication that one or more codes from that branch of the the tree are selected. This issue is only for the second case you descibre.