dtable-ui-component 5.0.19 → 5.0.21

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.
@@ -31,6 +31,7 @@ class SelectOptionGroup extends _react.Component {
31
31
  this.optionGroupRef.style.top = position.y - height + 'px';
32
32
  }
33
33
  this.optionGroupRef.style.opacity = 1;
34
+ this.searchInputRef.current && this.searchInputRef.current.inputRef.focus();
34
35
  } else {
35
36
  if (height + top > window.innerHeight) {
36
37
  const borderWidth = 2;
@@ -154,6 +155,7 @@ class SelectOptionGroup extends _react.Component {
154
155
  };
155
156
  this.filterOptions = null;
156
157
  this.timer = null;
158
+ this.searchInputRef = /*#__PURE__*/_react.default.createRef();
157
159
  }
158
160
  componentDidMount() {
159
161
  window.addEventListener('keydown', this.onHotKey);
@@ -226,7 +228,8 @@ class SelectOptionGroup extends _react.Component {
226
228
  className: "option-search-control",
227
229
  placeholder: searchPlaceholder,
228
230
  onChange: this.onChangeSearch,
229
- autoFocus: true
231
+ autoFocus: true,
232
+ ref: this.searchInputRef
230
233
  })), /*#__PURE__*/_react.default.createElement("div", {
231
234
  className: "option-group-content",
232
235
  ref: ref => this.optionGroupContentRef = ref
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "5.0.19",
3
+ "version": "5.0.21",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "2.0.5",