Variable updating on second click but not first

Hey there!

I encountered an issue with a dropdown feature in my project. When I click the button to trigger the dropdown, it only works on the second click, not the first.

Steps to Reproduce:

  1. Click the show/hide button.
  2. Observe that the dropdown does not activate on the first click but does on the second click.

Setup Details:

  • The feature is supposed to work by setting the class active when showCalendar is true.
  • Upon the first click, nothing changes. It only starts working on the second click.
  • I have implemented an onClick event that sets a variable and toggles visibility.
  • The button rotates once showCalendar is true, indicating that the class active is correctly set.
  • The dropdown component appears after the second click.

Additional Information:

  • The same setup works perfectly with other buttons.
  • The calendar component should drop down and become visible when showCalendar is set to true.
  • Clicking the background should hide the dropdown as intended.

Could you please help identify why the dropdown doesn’t work on the first click and what might need to be adjusted?

Here’s a recording of whats happening:

Hello @damien!

You can reach the Wized Support team here → Support