The value is not consistently aligned with other similar fields.
When an editable field is set to read-only because of a condition, the value is not consistently aligned with other similar fields.
User is having a custom PADecimal control. OOTB pxNumber control works as expected.
Steps to Reproduce
a)Create a layout with an editable field using the custom control PADecimal.
b)Another field in the same layout has an onchange refresh section.
c)On refresh of the section, (based on some condition) the editable field needs to be rendered as readOnly.
After refresh, the readOnly field becomes misaligned .
We can observe other fields (above and below )are in line , however , the custom control field becomes misaligned by a few pixels.
Issue is resolved with the below solution :
a) Create a section having two layouts.
b) First Layout displays the custom PADecimal control as an editable control.
c) Second Layout displays the control pxNumber as readOnly.
Both the controls refer to the same property and are displayed using a VisibleWhen condition .
Include this section inside the layout of the cell where you are presently having the property with PADecimal control.