BristolMyersSquibb / blockr

Composable, extensible no-code UI
https://bristolmyerssquibb.github.io/blockr/
GNU General Public License v3.0
35 stars 3 forks source link

Slider is flickering for filter block #322

Open Ramdhadage opened 8 months ago

Ramdhadage commented 8 months ago

Slider is flickering for filter block when I fallow below steps for:

  1. Add data block which have default date set as airquality.
  2. Add filter block.
  3. Select Wind from columns dropdown in the filter block.
  4. Change value of Values_Wind slider
  5. Delete Ozone column Bug: Values_Wind slider is flickering.

image image

JohnCoene commented 8 months ago

I've got a temp fix on critical-issues branch.

See https://github.com/blockr-org/blockr/commit/cbcd4770def49113ad5ec6aefaaad5874e259fb4

I only run ui_update if the value has been updated and it seems to get rid of the infinite reactive loop.

JohnCoene commented 7 months ago

Unfortunately my hack does not cover all instances of the infinite reactive loop. It does solve the one saved in this very issue but it can still occur in other places.

The hack was to store the values of fields set in the previous reactive flush to reuse them so we can only update the ui with ui_update but this does not work when input values are changed rapidly, e.g.: clicking the increment button on a numeric input.