dtable-ui-component 6.0.110-oot.3 → 6.0.110-oot.5

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.
@@ -90,3 +90,10 @@
90
90
  white-space: nowrap;
91
91
  color: #868E96;
92
92
  }
93
+
94
+ .seatable-customize-select .selected-option-show {
95
+ height: 20px;
96
+ line-height: 20px;
97
+ margin-right: 8px;
98
+ width: calc(100% - 20px);
99
+ }
@@ -66,6 +66,9 @@ class SearchInput extends _react.Component {
66
66
  if (!isClearable || !searchValue) return null;
67
67
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
68
68
  className: (0, _classnames.default)('search-text-clear input-icon-addon', clearClassName),
69
+ style: {
70
+ fontSize: '12px'
71
+ },
69
72
  onClick: this.clearSearch,
70
73
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
71
74
  symbol: "close"
@@ -129,24 +129,9 @@ class DTableSelect extends _react.default.Component {
129
129
  options.shift();
130
130
  }
131
131
  }
132
- const optionsWithCheck = options.map(option => {
133
- const isSelected = value && value.value === option.value;
134
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, option), {}, {
135
- label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
136
- className: "d-flex align-items-center justify-content-between",
137
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
138
- className: "select-option-label",
139
- children: option.label
140
- }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
141
- className: "dtable-font dtable-icon-check seatable-check-color",
142
- style: {
143
- width: '12px',
144
- height: '12px'
145
- }
146
- })]
147
- })
148
- });
149
- });
132
+
133
+ // 保持 label 为纯文本
134
+ const optionsWithCheck = options.map(option => (0, _objectSpread2.default)({}, option));
150
135
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
151
136
  value: value,
152
137
  isDisabled: isDisabled,
@@ -177,7 +162,32 @@ class DTableSelect extends _react.default.Component {
177
162
  filterOption: customFilterOption,
178
163
  autoFocus: autoFocus,
179
164
  form: form,
180
- menuIsOpen: true
165
+ formatOptionLabel: (option, _ref3) => {
166
+ let {
167
+ context
168
+ } = _ref3;
169
+ const isSelected = value && value.value === option.value;
170
+ if (context === 'menu') {
171
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
172
+ className: "d-flex align-items-center justify-content-between",
173
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
174
+ className: "select-option-label",
175
+ children: option.label
176
+ }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
177
+ className: "dtable-font dtable-icon-check seatable-check-color",
178
+ style: {
179
+ width: '12px',
180
+ height: '12px'
181
+ }
182
+ })]
183
+ });
184
+ }
185
+ // context === 'value',即已选项显示区
186
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
187
+ className: "select-option-label",
188
+ children: option.label
189
+ });
190
+ }
181
191
  });
182
192
  }
183
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.110oot.3",
3
+ "version": "6.0.110oot.5",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.4",