appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.13k stars 3.69k forks source link

[Bug]: isDisabled function not working if button is disabled from invalid Form #36025

Open leonlazic opened 1 month ago

leonlazic commented 1 month ago

Is there an existing issue for this?

Description

If I put a button in a form and select "Disable on Invalid Form" and they try to write a conditional statement that checks if that button is disabled it will always say the button isn't disabled.

Screenshot

Steps To Reproduce

  1. Create a form
  2. Add a Button1 inside a form and make Disable on Invalid Form = true
  3. Add a Button2 outside a form
  4. On Button2 add Disabled = {{Button1.isDisabled}}
  5. Button2's condition will always return false even if the Button1 is disabled because of the invalid form.

Public Sample App

No response

Environment

Production

Severity

Medium (Frustrating UX)

Issue video log

No response

Version

Cloud

rahulbarwal commented 1 month ago

@leonlazic The probable cause of it not working is that the btn_next's isDisabled is not really updated and it is showing disabled with the Form's valid property. Can we not use Disabled invalid forms in the btn_billing as well?

leonlazic commented 1 month ago

The button billing is outside the form since I am using the form inside the tabs widget to make a multi step form and the buttons btn_basic and btn_billingare there to show the steps hence being out of the form and tab widget