-
Notifications
You must be signed in to change notification settings - Fork 16
Description
When the code inside the Code Editor is invalid (e.g. contains lint errors), the component renders a visual element <div class="CodeMirror-gutter-elt" inside <div class="CodeMirror-gutter-wrapper".
Now that the component has an invalid prop: #3763 we can use this internal validation mechanisms to set the component to invalid, when its value is invalid. For example, when the value contains lint errors.
The invalid prop in limel-code-editor has proper accessibility support, and is better wired for indicating the invalid state.
That alert of "Should be a valid JSON" doesn't need to be displayed like this anymore:
| props.onValidate('Should be a valid JSON document'); |
We need to revisit this form widget, and instead use helperText,
https://github.com/Lundalogik/lime-elements/blob/main/src/components/form/widgets/code-editor.ts
Metadata
Metadata
Assignees
Labels
Type
Projects
Status