dtable-ui-component 6.0.110-aol.2 → 6.0.110-aol.4

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.
@@ -95,11 +95,13 @@
95
95
  white-space: nowrap;
96
96
  }
97
97
 
98
- .option-group .custom-select-search {
98
+ .option-group .option-group-selector-multiple-select .option-group-search,
99
+ .option-group .option-group-selector-single-select .option-group-search {
99
100
  padding: 0 0 8px 0 !important;
100
101
  }
101
102
 
102
- .custom-select-search .form-control {
103
+ .option-group-selector-multiple-select .form-control,
104
+ .option-group-selector-single-select .form-control {
103
105
  border: none;
104
106
  border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
105
107
  border-radius: 4px 4px 0 0;
@@ -107,7 +109,8 @@
107
109
  height: 32px;
108
110
  }
109
111
 
110
- .custom-select-search.form-control:focus {
112
+ .option-group-selector-multiple-select .form-control:focus,
113
+ .option-group-selector-single-select .form-control:focus {
111
114
  border-color: transparent !important;
112
115
  border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
113
116
  box-shadow: none !important;
@@ -52,9 +52,10 @@ class DTableCustomizeSelect extends _react.Component {
52
52
  };
53
53
  this.getFilterOptions = searchValue => {
54
54
  const {
55
- options
55
+ options,
56
+ searchable
56
57
  } = this.props;
57
- if (!Array.isArray(options) || options.length < 10) return Array.isArray(options) ? options : [];
58
+ if (!searchable) return options || [];
58
59
  const validSearchVal = searchValue.trim().toLowerCase();
59
60
  if (!validSearchVal) return options || [];
60
61
  return options.filter(option => {
@@ -87,6 +88,7 @@ class DTableCustomizeSelect extends _react.Component {
87
88
  value,
88
89
  options,
89
90
  placeholder,
91
+ searchable,
90
92
  searchPlaceholder,
91
93
  noOptionsPlaceholder,
92
94
  isLocked,
@@ -94,7 +96,6 @@ class DTableCustomizeSelect extends _react.Component {
94
96
  addOptionAble,
95
97
  component
96
98
  } = this.props;
97
- const searchable = Array.isArray(options) && options.length > 10;
98
99
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
99
100
  ref: node => this.selector = node,
100
101
  className: (0, _classnames.default)('dtable-select custom-select', {
@@ -17,7 +17,7 @@
17
17
  .option-group .option-group-search {
18
18
  width: 100%;
19
19
  min-width: 170px;
20
- padding: 8px 10px 0 !important
20
+ padding: 8px 8px 0 !important
21
21
  }
22
22
 
23
23
  .option-group-search .form-control {
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .option-group .option-group-top {
40
- padding-top: 8px;
40
+ padding-top: 8px !important;
41
41
  }
42
42
 
43
43
  .option {
@@ -122,17 +122,3 @@
122
122
  .option-group-selector-single-select .form-control {
123
123
  padding: .375rem .5rem !important;
124
124
  }
125
-
126
- .option-group-search .form-control {
127
- border: none;
128
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
129
- border-radius: 4px 4px 0 0;
130
- padding: .375rem 1rem !important;
131
- height: 32px;
132
- }
133
-
134
- .option-group-search .form-control:focus {
135
- border-color: transparent !important;
136
- border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
137
- box-shadow: none !important;
138
- }
@@ -194,7 +194,6 @@ class SelectOptionGroup extends _react.Component {
194
194
  addOptionAble,
195
195
  component
196
196
  } = this.props;
197
- const isUnSingleSelectOrMultiSelect = className === 'selector-multiple-select' || className === 'selector-single-select';
198
197
  const {
199
198
  AddOption
200
199
  } = component || {};
@@ -221,6 +220,7 @@ class SelectOptionGroup extends _react.Component {
221
220
  opacity: 0
222
221
  };
223
222
  }
223
+ const isUnSingleSeleectOrMultiSelect = className === 'selector-single-select' || className === 'selector-multiple-select';
224
224
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
225
225
  ref: ref => this.clickOutsideRef = ref,
226
226
  onClickOutside: this.props.onClickOutside,
@@ -237,7 +237,7 @@ class SelectOptionGroup extends _react.Component {
237
237
  onClick: e => e.stopPropagation(),
238
238
  children: value.label || ''
239
239
  }), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
240
- className: `option-group-search ${!isUnSingleSelectOrMultiSelect ? 'custom-select-search' : ''}`,
240
+ className: `option-group-search ${!isUnSingleSeleectOrMultiSelect ? 'option-group-other-search' : ''}`,
241
241
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
242
242
  className: "option-search-control",
243
243
  placeholder: searchPlaceholder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.110-aol.2",
3
+ "version": "6.0.110-aol.4",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.4",