[Input Masks Library] Input field is non-editable
Forge component by Labs

Hi,

I have used the Number Input Mask in one of the columns of a table, which is of data type Number. It holds the value of an entity's attribute. I also have a button that makes all inputs enabled, when clicked. However, the input with the NumberMask remains non-editable at all times, unlike the other normal inputs.

Input configuration:

NumberMask configuration:

Do you know what could be causing this issue?

Thanks.

Hello, 


are you forgetting a refresh maybe?

M I wrote:

Hi,

I have used the Number Input Mask in one of the columns of a table, which is of data type Number. It holds the value of an entity's attribute. I also have a button that makes all inputs enabled, when clicked. However, the input with the NumberMask remains non-editable at all times, unlike the other normal inputs.

Input configuration:

NumberMask configuration:

Do you know what could be causing this issue?

Thanks.

 Are you using Reactive or Web Traditional ?  Maybe you need to use an ajax refresh. 

 

mvp_badge
MVP

Hello,

@Camila @Daniel, this component is specific for Reactive applications, so he must be using a Reactive Web Application. So the problem shouldn't be a missing Ajax Refresh.


@M I, the mask configuration seems to be very standard. What exactly does the button that makes all inputs enabled? Can you please verify if you're affecting the variable binded to the Enabled property of the input? Maybe that variable value is always False and you are not changing it to True, that's why the input remains non-editable.


Kind regards,

Rui Barradas

This is still happening in CurrencyMask and NumberMask blocks because they have different bahaviour than other blocks. The main reason for this is because the input attributes are copied only in the OnReady event, and don't get updated after that.

i.e. : If you change the Enabled attribute of the input in runtime, the mask input doesn't get updated.

Here is a fix:

There are two implementations:

  1. Update the "disabled" property to be the same of original input (simpler)
  2. Remove properties that do not exist in the original input (with some being exceptions to this rule)

Both implementations just "remove" attributes in the update event (disabled = false = removed). If you need to add attributes in runtime to the masked input you will need to tweak the code.

The OML is attached.

Regards,

Leandro

CloneOfInputMasksLibrary.oml

Hi,

This should be fixed in the latest version (1.1.5).

Thanks @Leandro Oliveira for the suggestion, I ended up using it in the solution.

Best regards,

Carlos Xavier

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.