Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/ui/src/widgets/schema-editor/editor/Editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ export function TextDataEditor({ value, onChange, onCancel, onSave }: DataEditor
onChange(e.target.value);
};

const onBlur = () => {
onSave?.();
};

return (
<input onKeyUp={onKeyUp} ref={ref} value={value} onChange={_onChange} className={Styles.INPUT_UNSTYLED} style={{ fontSize: "inherit" }} />
<input onKeyUp={onKeyUp} onBlur={onBlur} ref={ref} value={value} onChange={_onChange} className={Styles.INPUT_UNSTYLED} style={{ fontSize: "inherit" }} />
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function PropertyEditor({ value, onChange, onCancel, onSave }: DataEditor
<PropertyTypeEditor value={value.type} onChange={onTypeChange} onCancel={onCancel} onSave={onSave} />
</div>
<div>
<Button variant={"ghost"} size={"xs"} onClick={() => setModalOpen(true)} title="Edit description">
<Button variant={"ghost"} size={"xs"} onClick={() => setModalOpen(true)} title="Edit description">
<AlignLeft className="size-4" />
</Button>
<EditDescriptionModal value={value.description} isOpen={isModalOpen} onClose={onDescriptionChange} />
Expand Down Expand Up @@ -82,8 +82,12 @@ export function PropertyNameEditor({ value, onChange, onCancel, onSave }: DataEd
onChange(e.target.value);
}

const onBlur = () => {
onSave?.();
};

return (
<input onKeyUp={onKeyUp} ref={ref} value={value} onChange={_onChange} className={Styles.INPUT_UNSTYLED} style={{ fontSize: "inherit", width: "", display: "inline" }} />
<input onKeyUp={onKeyUp} onBlur={onBlur} ref={ref} value={value} onChange={_onChange} className={Styles.INPUT_UNSTYLED} style={{ fontSize: "inherit", width: "", display: "inline" }} />
)
}

Expand All @@ -101,7 +105,7 @@ function PropertyTypeEditor({ value, onChange, onCancel, onSave }: DataEditorPro
}
}
return (
<VSelectBox
<VSelectBox
className={Styles.INPUT_UNSTYLED}
options={TYPE_OPTIONS}
value={value || ''}
Expand Down