dtable-ui-component 7.0.0-ahn.11 → 7.0.0-ahn.13

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.
@@ -66,6 +66,7 @@
66
66
  color: var(--bs-icon-color);
67
67
  }
68
68
 
69
+ .dtable-ui-user-select-popover .select-search-control,
69
70
  .dtable-popover .select-search-control {
70
71
  border-top-left-radius: 8px;
71
72
  border-top-right-radius: 8px;
@@ -30,6 +30,7 @@ class SelectOptionGroup extends _react.Component {
30
30
  this.optionGroupRef.style.top = position.y - height + 'px';
31
31
  }
32
32
  this.optionGroupRef.style.opacity = 1;
33
+ this.searchInputRef.current && this.searchInputRef.current.inputRef.focus();
33
34
  } else {
34
35
  if (height + top > window.innerHeight) {
35
36
  const borderWidth = 2;
@@ -79,6 +80,10 @@ class SelectOptionGroup extends _react.Component {
79
80
  if (isInModal) {
80
81
  e.stopPropagation();
81
82
  e.nativeEvent.stopImmediatePropagation();
83
+
84
+ // ClickOutside set isClickedInside to true via mouse down capture first
85
+ // Set isClickedInside to false after mouse down
86
+ this.clickOutsideRef && this.clickOutsideRef.setClickedInsideStatus(false);
82
87
  }
83
88
  };
84
89
  this.scrollContent = () => {
@@ -171,6 +176,7 @@ class SelectOptionGroup extends _react.Component {
171
176
  };
172
177
  this.filterOptions = null;
173
178
  this.timer = null;
179
+ this.searchInputRef = /*#__PURE__*/_react.default.createRef();
174
180
  }
175
181
  componentDidMount() {
176
182
  window.addEventListener('keydown', this.onHotKey);
@@ -222,6 +228,7 @@ class SelectOptionGroup extends _react.Component {
222
228
  }
223
229
  style.top = style.top + 4;
224
230
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
231
+ ref: ref => this.clickOutsideRef = ref,
225
232
  onClickOutside: this.props.onClickOutside,
226
233
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
227
234
  className: (0, _classnames.default)('seatable-option-group', className ? 'seatable-option-group-' + className : '', {
@@ -242,7 +249,8 @@ class SelectOptionGroup extends _react.Component {
242
249
  onChange: this.onChangeSearch,
243
250
  clearValue: this.clearSearch,
244
251
  autoFocus: true,
245
- isClearable: true
252
+ isClearable: true,
253
+ ref: this.searchInputRef
246
254
  })
247
255
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
248
256
  className: "seatable-option-group-content",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "7.0.0ahn.11",
3
+ "version": "7.0.0ahn.13",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "5.0.9",