Dmx-bind:disabled expresssions are not being evaluated - v6.0-Beta-9

Hello everyone,

In v6.0-Beta-9, the dmx-bind:disabled expressions are not being evaluated. I don’t know whether it’s a bug or my code is incorrect. All these expressions are being evaluated correctly in v5.8.2 (non-beta).

Below is an example of a dynamic disabled expression for a button element. The button should be disabled when TrialMasterCirculated==0, but it isn’t disabled when the expression is evaluated to 0 value.

<button class="btn btn-sm p-0 rounded me-3" dmx-bind:disabled="TrialMasterCirculated==0">
   <i class="fa-solid fa-arrow-up-right-from-square fa-fw fs-5 text-primary" dmx-on:click="browser1.goto('/tenant/app-portal/trial-values/'+TrialMasterID,true,'Trial Values')">
   </i>
</button>

If anyone else has come across this issue in v6.0-Beta-9, then it’s most likely a bug.

Where is this button located? Is it a repeat region or inside some kind of conditional? Are you sure the TrialMasterCirculated==0 expression actually returns true, when added to your page like {{TrialMasterCirculated==0}}?

Hi Teodor,

It’s in a table row that is inside a conditional div. I tested it by removing the conditional, but it doesn’t disable the button.

When I tested it by adding the expression as below on the page, it’s being evaluated correctly inside the conditional. The arrow-up icon should be disabled if TrialMasterCirculated evaulates to 0, but it stays enabled.

Circulated: {{TrialMasterCirculated==0?'No':'Yes'}}

Screen Shot 2023-09-27 at 5.43.36 pm

I have checked in other places in the app and none of the buttons are being dynamically disabled.

Please test following update: dmxAppConnect.js.zip (116.8 KB)

Hi Patrick,

The updated script is evaluating the dynamic disabled expressions correctly. Thank you for this fix.

However, it is not evaluating the dynamic readonly expressions for the form input component. On one page, I had both dynamic properties - disabled buttons and readonly inputs and it’s not working for the dmx-bind:readonly input property.

Here a new update: dmxAppConnect.js.zip (116.8 KB)

Hi Patrick,

The dmx-bind:readonly epression is still not being evaluated. This is the dmxAppConnect.js version I have tested.

/*!
 App Connect
 Version: 2.0.0-beta.16
 (c) 2023 Wappler.io
 @build 2023-09-27 14:04:22
 */

Can you post the html of the element where the readonly is used on.

Hi Patrick,

I’m sorry, it was my mistake. The dmx-bind:readonly expression is being evaluated correctly. I got caught out with the same white background of the input element with readonly property, as it is for the normal input. I believe the input element with readonly property appeared with slightly darker background in previous versions.

Thanks for resolving these issues promptly!

Fixed in Wappler 6 beta 10