Frezyx/group_button

Please add a read-only properties

Ludy2015 opened this issue · 3 comments

Please add a read-only properties~~~

Hello @Ludy2015
I don't understand you

I'll second this. Unless there a way to do it already. I have a form, that I display to a user with a group button on it. I use the same form for view and edit. They have to click an edit button, so the form starts out in read only mode, and switches to edit mode. At least that's the idea. On my other fields they have ways to make them read only. Either a read only attribute or setting the select option to null, etc.

What I've done to sort of address this is disable each button (using disabled indexes) when in read only mode, then when the state changes, re-enable each button. The problem with this is it doesn't maintain the text properties (colours etc) setting them to null because the button isn't enabled.
On most of the other input widgets I use, they have a readOnly property (true/false) which I put a state management element into, since I generally use one view for customers to view and then edit a form, using an edit toggle. .