molgenis / molgenis-emx2

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

fix(directory): switching match all/any causes data reload <= big refactor we propose to do this when moving to tailwind. #3861

Open chinook25 opened 3 weeks ago

chinook25 commented 3 weeks ago

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

Describe the bug In the directory app, when switching a filter between match all and any while no filters are set, the data reloads.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://emx2.dev.molgenis.org/directory-demo/directory/#/catalogue'
  2. Click on a filter
  3. Switch from match any to match all
  4. See the data refresh

Expected behavior If no filter is set, the data should not reload when doing the switch.

Additional context Vue watchers do not return the old versions of objects/arrays when doing deep watches, so the watch oldValue can't be used to solve this unless wel make new copies of the objects every time they are changed (computed wrapping?) Another way that can solve this is removing the watch and triggering the update manually when updating the filters.