chore: fix Read only widget incorrectly triggers configured actions that are hidden because of the toggle (#34134)

Fixes #34000

/ok-to-test tags="@tag.Anvil"<!-- This is an auto-generated comment:
Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9460620209>
> Commit: fd17eacb6f9edee8905fb5cf1054b56822f2c3cd
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9460620209&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->

Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro-2.local>
This commit is contained in:
Pawan Kumar 2024-06-11 12:47:17 +05:30 committed by GitHub
parent b9a7be3a64
commit 341a58e68f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,6 +83,8 @@ class WDSInputWidget extends WDSBaseInputWidget<InputWidgetProps, WidgetState> {
}
onFocusChange = (focusState: boolean) => {
if (this.props.isReadOnly) return;
if (focusState) {
this.props.updateWidgetMetaProperty("isFocused", focusState, {
triggerPropertyName: "onFocus",