@imposium-hub/components 1.38.2 → 1.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/list-field/ListField.tsx +9 -5
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/styles.less +2 -1
- package/dist/styles.less.map +1 -1
- package/less/components/tabs.less +2 -1
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ interface IListFieldProps {
|
|
|
18
18
|
width? : string | number;
|
|
19
19
|
onChange(e) : void;
|
|
20
20
|
onError(e) : void;
|
|
21
|
+
onFocus? : () => void;
|
|
22
|
+
onBlur? : () => void;
|
|
21
23
|
info? : string;
|
|
22
24
|
labelPosition? : string;
|
|
23
25
|
}
|
|
@@ -61,6 +63,9 @@ class ListField extends React.PureComponent<IListFieldProps, IListFieldState> {
|
|
|
61
63
|
private inputBlur(e) {
|
|
62
64
|
|
|
63
65
|
hotkeys.unbind('enter', this.submitHandler);
|
|
66
|
+
if (this.props.onBlur) {
|
|
67
|
+
this.props.onBlur();
|
|
68
|
+
}
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
private inputChanged(e) {
|
|
@@ -72,10 +77,9 @@ class ListField extends React.PureComponent<IListFieldProps, IListFieldState> {
|
|
|
72
77
|
|
|
73
78
|
private inputFocus(e) {
|
|
74
79
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
hotkeys('enter', this.submitHandler);
|
|
80
|
+
hotkeys('enter', this.submitHandler);
|
|
81
|
+
if (this.props.onFocus) {
|
|
82
|
+
this.props.onFocus();
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -162,7 +166,7 @@ class ListField extends React.PureComponent<IListFieldProps, IListFieldState> {
|
|
|
162
166
|
style = 'subtle'
|
|
163
167
|
tooltip = {tooltipAdd}
|
|
164
168
|
color = 'primary'
|
|
165
|
-
onClick = {
|
|
169
|
+
onClick = {this.submitHandler}>
|
|
166
170
|
{ICON_PLUS}
|
|
167
171
|
</Button>);
|
|
168
172
|
|