Display hint to user on how to add items in an EditableList (#3475)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-23 09:26:23 -04:00
1 parent 239bfec99c
commit 07532b1552
2 files changed
+37 -10

No files matched your search

@@ -53,11 +53,9 @@ export class EditableList<T> extends React.Component<Props<T>> {
@boundMethod
onSubmit(val: string, evt: React.KeyboardEvent) {
const { add } = this.props;
if (val) {
evt.preventDefault();
add(val);
this.props.add(val);
}
}
@@ -72,6 +70,7 @@ export class EditableList<T> extends React.Component<Props<T>> {
onSubmit={this.onSubmit}
validators={validators}
placeholder={placeholder}
iconRight={({ isDirty }) => isDirty ? <Icon material="keyboard_return" size={16} /> : null}
/>
</div>
<div className="el-contents">