dtable-ui-component 6.0.110-oot.22 → 6.0.110-oot.24
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/lib/DTableCustomizeCollaboratorSelect/index.js +20 -2
- package/lib/DTableCustomizeSearchInput/index.css +3 -3
- package/lib/DTableCustomizeSelect/index.css +1 -0
- package/lib/DTableCustomizeSelect/select-option-group/index.css +2 -18
- package/lib/DTableGroupSelect/index.css +1 -1
- package/lib/DTableSelect/index.js +1 -1
- package/lib/SelectOptionGroup/index.css +1 -1
- package/lib/SelectOptionGroup/index.js +6 -18
- package/package.json +1 -1
|
@@ -54,6 +54,22 @@ class CollaboratorSelect extends _react.Component {
|
|
|
54
54
|
if (!searchable) return options || [];
|
|
55
55
|
return (0, _dtableUtils.searchCollaborators)(options, searchValue);
|
|
56
56
|
};
|
|
57
|
+
this.onClick = event => {
|
|
58
|
+
const target = event.target;
|
|
59
|
+
const name = target.className;
|
|
60
|
+
const {
|
|
61
|
+
isShowSelectOptions
|
|
62
|
+
} = this.state;
|
|
63
|
+
if (!isShowSelectOptions || name === 'select-placeholder' || name.includes('icon-fork-number') || this.selector.contains(target)) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const {
|
|
67
|
+
isUsePopover
|
|
68
|
+
} = this.props;
|
|
69
|
+
if (isUsePopover && !this.collaboratorSelectPopoverRef.contains(target) || !isUsePopover && !this.selector.contains(target)) {
|
|
70
|
+
this.closeSelect();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
57
73
|
this.renderOptionGroup = () => {
|
|
58
74
|
const {
|
|
59
75
|
value,
|
|
@@ -81,7 +97,8 @@ class CollaboratorSelect extends _react.Component {
|
|
|
81
97
|
getFilterOptions: this.getFilterOptions,
|
|
82
98
|
supportMultipleSelect: this.props.supportMultipleSelect,
|
|
83
99
|
stopClickEvent: true,
|
|
84
|
-
isShowSelected: true
|
|
100
|
+
isShowSelected: true,
|
|
101
|
+
onClickOutside: this.onClick
|
|
85
102
|
});
|
|
86
103
|
}
|
|
87
104
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
@@ -106,7 +123,8 @@ class CollaboratorSelect extends _react.Component {
|
|
|
106
123
|
getFilterOptions: this.getFilterOptions,
|
|
107
124
|
supportMultipleSelect: this.props.supportMultipleSelect,
|
|
108
125
|
stopClickEvent: true,
|
|
109
|
-
isShowSelected: true
|
|
126
|
+
isShowSelected: true,
|
|
127
|
+
onClickOutside: this.onClick
|
|
110
128
|
})
|
|
111
129
|
});
|
|
112
130
|
};
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.seatable-search-input .form-control {
|
|
13
13
|
height: 32px;
|
|
14
14
|
border: none;
|
|
15
|
-
padding: .375rem 1rem;
|
|
15
|
+
padding: .375rem 0 .375rem 1rem;
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
border-bottom: 1px solid var(--bs-border-color);
|
|
18
18
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
.seatable-search-input .input-icon-addon {
|
|
27
27
|
z-index: 1;
|
|
28
28
|
pointer-events: auto;
|
|
29
|
-
min-width: 2.
|
|
29
|
+
min-width: 2.75rem !important;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.seatable-search-input .input-icon-addon svg {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
.seatable-search-input-multiple .input-icon-addon {
|
|
60
60
|
z-index: 1;
|
|
61
61
|
pointer-events: auto;
|
|
62
|
-
min-width: 2.
|
|
62
|
+
min-width: 2.75rem !important;
|
|
63
63
|
top: 10px;
|
|
64
64
|
height: 30px;
|
|
65
65
|
right: 10px;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
.seatable-option-group .seatable-option-group-search {
|
|
16
16
|
width: 100%;
|
|
17
|
-
padding: 6px 10px;
|
|
18
17
|
min-width: 170px;
|
|
19
18
|
position: relative;
|
|
20
19
|
padding: 0;
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
.seatable-option-group .seatable-option-group-search .form-control {
|
|
26
25
|
height: 32px;
|
|
27
26
|
border: none;
|
|
28
|
-
padding: .375rem 1rem;
|
|
27
|
+
padding: .375rem 0 .375rem 1rem;
|
|
29
28
|
cursor: pointer;
|
|
30
29
|
border-bottom: 1px solid var(--bs-border-color);
|
|
31
30
|
}
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
.seatable-option-group .seatable-option-group-search .input-icon-addon {
|
|
39
38
|
z-index: 1;
|
|
40
39
|
pointer-events: auto;
|
|
41
|
-
min-width: 2.
|
|
40
|
+
min-width: 2.75rem !important;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
.seatable-option-group .seatable-option-group-search .input-icon-addon svg {
|
|
@@ -84,21 +83,6 @@
|
|
|
84
83
|
background-color: rgba(0, 0, 0, 0.04);
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
/* .seatable-select-option .seatable-multicolor-icon-tick {
|
|
88
|
-
right: 10px;
|
|
89
|
-
position: absolute;
|
|
90
|
-
color: inherit;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.seatable-select-option:not(.seatable-select-option-active):hover .header-icon .seatable-multicolor-icon {
|
|
94
|
-
fill: #aaa;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.seatable-select-option:not(.seatable-select-option-active):hover .header-icon .sf2-icon-tick {
|
|
98
|
-
color: #aaa;
|
|
99
|
-
} */
|
|
100
|
-
|
|
101
|
-
|
|
102
86
|
.seatable-select-option .select-option-name .multiple-select-option {
|
|
103
87
|
margin: 0;
|
|
104
88
|
}
|
|
@@ -9,7 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _option = _interopRequireDefault(require("./option"));
|
|
12
|
-
var
|
|
12
|
+
var _DTableCustomizeSearchInput = _interopRequireDefault(require("../DTableCustomizeSearchInput"));
|
|
13
13
|
var _KeyCodes = _interopRequireDefault(require("./KeyCodes"));
|
|
14
14
|
var _ClickOutside = _interopRequireDefault(require("../ClickOutside"));
|
|
15
15
|
require("./index.css");
|
|
@@ -261,27 +261,15 @@ class SelectOptionGroup extends _react.Component {
|
|
|
261
261
|
onClick: e => e.stopPropagation(),
|
|
262
262
|
children: value.label || ''
|
|
263
263
|
}), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
264
|
-
className: "
|
|
265
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
266
|
-
className: "option-search-control",
|
|
264
|
+
className: "seatable-search-input-multiple",
|
|
265
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSearchInput.default, {
|
|
267
266
|
placeholder: searchPlaceholder,
|
|
268
267
|
onChange: this.onChangeSearch,
|
|
268
|
+
value: searchVal,
|
|
269
|
+
clearValue: () => this.onChangeSearch(''),
|
|
269
270
|
autoFocus: true,
|
|
270
|
-
ref: this.searchInputRef,
|
|
271
|
-
clearValue: this.clearValue,
|
|
272
271
|
isClearable: true,
|
|
273
|
-
|
|
274
|
-
ClearIndicator: props => {
|
|
275
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
276
|
-
className: (0, _classnames.default)('select-search-text-clear input-icon-addon seatable-icon dtable-font dtable-icon-x'),
|
|
277
|
-
onClick: e => {
|
|
278
|
-
e.stopPropagation();
|
|
279
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
280
|
-
props.clearValue();
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
}
|
|
272
|
+
isMultiple: true
|
|
285
273
|
})
|
|
286
274
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
287
275
|
className: "option-group-content ".concat(!searchable && !supportMultipleSelect ? 'option-group-top' : ''),
|