Question: Difference between "disable" and "readonly" in form components?
-
What is the difference between “disable” and “readonly” in form components, like q-input, q-select, etc.?
I’m aware of the visual differences (e.g. “disabled” icon shows at mouseover for disabled fields).
But what other differences exist? I would expect that e.g. for a q-select, I can open the pulldown menu with options, if readonly (without ability to change the selected options), and I can’t open the options pulldown if disabled…but a short test seems like I can’t open the options pulldown in either case.
So I’m not sure when to use one vs. the other, and why the two exist.
-
it mainly useful in forms,
an input with (readonly) is just not editable, but gets sent on submit.
while (disabled) input isn’t editable and isn’t sent on submit. -
@mickey58 AFAIK, readonly text can be selected, disabled can’t.
-
@suleiman_as , @walfin - thanks, that’s not explained in the docs. I may open a doc PR for it.