mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
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">
|
||||
|
||||
Reference in new issue
Block a user