@serenity-is/corelib / EditorUtils / setReadOnly

Variable: setReadOnly()

const setReadOnly: (elements, value) => void = setReadonly

Defined in: src/ui/editors/editorutils.tsx:188

Legacy alias for setReadonly

This functions sets readonly class and disabled (for select, radio, checkbox) or readonly attribute (for other inputs) on given elements or widgets. If a widget is passed and it has set_readOnly method it is called instead of setting readonly class or attributes. Note that if an element, instead of the widget attached to it is passed directly, this searchs for a widget attached to it. If you don't want this behavior, use setElementReadOnly method.

Parameters

elements

Element | Widget<any> | ArrayLike<Element | Widget<{ }>>

value

boolean

Returns

void