platform icon indicating copy to clipboard operation
platform copied to clipboard

Switcher status does not update correctly

Open didix16 opened this issue 4 years ago • 0 comments

Describe the bug I'm trying to develop an inline function ('onchange' event in list screen ) using the Switcher component. At the moment I'm just changing the switcher by clicking it and nothing else. If I click the switch, say from ON to OFF ( I get the data from DDBB registry which the value is 1), then the switch is correctly displayed but if I refresh the page by reloading with F5 then the switcher keeps it state in unchecked but it should display checked since in DDBB its value remains in 1.

BTW: If I reload the page with Control + F5 then the switch displays as expected. Maybe some kind of cache bug related?

To Reproduce Steps to reproduce the behavior:

  1. Put a Switcher component into a Screen. Make the Switcher value picks a boolean data from a DDBB registry. Ensure registry boolean value is 1
  2. Change the Switcher by clicking it.
  3. Refresh the page by pressing F5
  4. Switch status keeps in unchecked state (but it should be checked).

Expected behavior The switcher status should be checked after pressing F5 if the registry in DDBB is 1 and should be unchecked if is 0.

Screenshots Not applicable

Desktop (please complete the following information):

  • OS: Ubuntu 20.04 LTS
  • Browser Firefox
  • Version 89.0 (64-bit)

Server (please complete the following information):

  • Platfrom Version: 10.4.2
  • Laravel Version: 8.32.1
  • PHP Version: 7.4
  • Database: MySql
  • Database Version: 8.0.25

didix16 avatar Jun 07 '21 10:06 didix16