70
Views
5
Comments
Solved
[Input Mask React] Outsystems Input Mask Reactive - not displaying decimal digits if they are null
Question
inputmask-react
Reactive icon
Forge asset by João Barata

Hi! 

I have a problem with Input Mask Reactive Forge Component.

When the decimal has some decimal digits, it works fine  (eg. 55,66)

However, if the number doesn't have any decimal digits after coma, I expect to show two zeroes, but this doesn't happen. (e.g if the value is 55 -> 55 is displayed instead of 55,00)

Will be grateful for help

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi,

Thank you for sharing the requested additional information. If you observe the asset implementation: InputMaskReact (Module) > MaskCurrency (Block) > OnReady > Mask_Currency (JS node).

The OptionalDisplayDecimalDigits - JS node input parameter is set with a hardcode True value. This configuration parameter controls the setting/to show the input decimal digits.

You can make it configurable by introducing an additional Boolean data type input parameter to the MaskCurrency block.

Demo Screen: InputMaskTask

I have tagged the Input Mask React asset to this post, to notify the concerned team about this observation. 

I hope this helps you!


Kind regards,

Benjith Sam

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi,

Assuming that you are referring this forge asset:  input-mask-reactive

I tried to implement the same requirement with the below shown configuration and it worked as expected.

Demo screen: InputMaskTask

If this doesn't helps, please share a little more information (oml, screen capture, code etc..) to help you better.


Kind regards,

Benjith Sam

2022-05-29 13-15-09
Valentyna Boiko

Hi, Benjith Sam ! Thank you for your reply. I didn't write the name of the mask correctly, I will add screen shot of how it looks and the inputs. The behavior I want from it is exactly the same as in your example.

input mask.png
input mask react.png
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi,

Thank you for sharing the requested additional information. If you observe the asset implementation: InputMaskReact (Module) > MaskCurrency (Block) > OnReady > Mask_Currency (JS node).

The OptionalDisplayDecimalDigits - JS node input parameter is set with a hardcode True value. This configuration parameter controls the setting/to show the input decimal digits.

You can make it configurable by introducing an additional Boolean data type input parameter to the MaskCurrency block.

Demo Screen: InputMaskTask

I have tagged the Input Mask React asset to this post, to notify the concerned team about this observation. 

I hope this helps you!


Kind regards,

Benjith Sam

2022-05-29 13-15-09
Valentyna Boiko

Thank you, Benjith Sam ! Now it works :)

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome. Glad it helped you :)


Kind regards,

Benjith Sam

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