dtable-ui-component 6.0.110-pli.2 → 6.0.110-ppd.1

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.
@@ -118,7 +118,7 @@
118
118
  box-shadow: none !important;
119
119
  }
120
120
 
121
- .seatable-group-select .option-group-content .dtable-icon-check {
121
+ .option-group-content .dtable-icon-check {
122
122
  color: #666666;
123
123
  font-size: 14px;
124
124
  }
@@ -137,6 +137,18 @@
137
137
  background-color:#FFFFFF;
138
138
  }
139
139
 
140
- .option-group-dtable-filter-select-column .option-group-search .clear-search-text {
141
- top: 4px;
140
+ .option-group-dtable-filter-select-column .seatable-icon-btn {
141
+ height: 12px !important;
142
+ width: 12px !important;
143
+ font-size: 12px !important;
144
+ }
145
+
146
+ .option-group-dtable-filter-select-column .clear-search-text {
147
+ position: absolute;
148
+ display: inline-block;
149
+ height: 12px;
150
+ width: 12px;
151
+ line-height: 12px;
152
+ top: 12px;
153
+ right: 18px;
142
154
  }
@@ -20,6 +20,12 @@
20
20
  padding: 0 0 8px 0 !important;
21
21
  }
22
22
 
23
+ .option-group .option-group-content .label-space {
24
+ display: flex;
25
+ justify-content: space-between;
26
+ align-items: center;
27
+ }
28
+
23
29
  .option-group-search .form-control {
24
30
  height: 32px;
25
31
  }
@@ -83,6 +83,11 @@ class SelectOptionGroup extends _react.Component {
83
83
  });
84
84
  }
85
85
  };
86
+ this.isEqual = (obj1, obj2) => {
87
+ if (obj1 === obj2) return true;
88
+ if (!obj1 || !obj2) return false;
89
+ return JSON.stringify(obj1) === JSON.stringify(obj2);
90
+ };
86
91
  this.onMouseDown = e => {
87
92
  const {
88
93
  isInModal
@@ -150,8 +155,8 @@ class SelectOptionGroup extends _react.Component {
150
155
  return this.filterOptions.map((opt, i) => {
151
156
  let key = opt.value.column ? opt.value.column.key : i;
152
157
  let isActive = this.state.activeIndex === i;
153
- let isSelected = value && (typeof value === 'object' && value.value === opt.value || typeof value === 'string' && value === opt.value);
154
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_option.default, {
158
+ let isSelected = value && (typeof value === 'object' && this.isEqual(value.value, opt.value) || typeof value === 'string' && value === opt.value);
159
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_option.default, {
155
160
  index: i,
156
161
  isActive: isActive,
157
162
  value: opt.value,
@@ -159,12 +164,14 @@ class SelectOptionGroup extends _react.Component {
159
164
  changeIndex: this.changeIndex,
160
165
  supportMultipleSelect: this.props.supportMultipleSelect,
161
166
  disableHover: this.state.disableHover,
162
- children: [isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
163
- className: "dtable-font dtable-icon-check",
164
- style: {
165
- marginRight: '8px'
166
- }
167
- }), opt.label]
167
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
168
+ className: "label-space",
169
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
170
+ children: [" ", opt.label]
171
+ }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
172
+ className: "dtable-font dtable-icon-check"
173
+ })]
174
+ })
168
175
  }, `${key}-${i}`);
169
176
  });
170
177
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.110-pli.2",
3
+ "version": "6.0.110-ppd.1",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.4",