@rainbow-oh/yee-c 0.8.6 → 0.8.8
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/dist/cjs/Input/style/index.less +2 -2
- package/dist/cjs/Selector/selector.js +16 -1
- package/dist/cjs/Table/hooks/useFilter.js +2 -2
- package/dist/cjs/Table/theader/filter.js +1 -1
- package/dist/cjs/style/themes.css +1 -1
- package/dist/cjs/style/variables.css +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Input/style/index.less +2 -2
- package/dist/esm/Selector/selector.js +9 -1
- package/dist/esm/Table/hooks/useFilter.js +2 -2
- package/dist/esm/Table/theader/filter.js +1 -1
- package/dist/esm/style/themes.css +1 -1
- package/dist/esm/style/variables.css +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/yee-c.min.css +1 -1
- package/dist/umd/yee-c.min.js +1 -1
- package/package.json +1 -1
- package/src/Input/style/index.less +2 -2
- package/src/Selector/selector.tsx +12 -1
- package/src/Table/hooks/useFilter.ts +2 -2
- package/src/Table/theader/filter.tsx +1 -1
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
width: 100%;
|
|
9
9
|
padding: var(--yee-input-padding, 2px 8px);
|
|
10
10
|
font-size: var(--yee-input-font-size);
|
|
11
|
-
line-height: var(--yee-input-line-height);
|
|
11
|
+
// line-height: var(--yee-input-line-height);
|
|
12
12
|
background-color: var(--yee-input-content-bg-color);
|
|
13
13
|
border: var(--yee-input-border-width) solid var(--yee-input-border-color);
|
|
14
14
|
border-radius: var(--yee-input-border-radius, 4px);
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
&-inner {
|
|
50
50
|
width: 100%;
|
|
51
51
|
font-family: var(--yee-font-family);
|
|
52
|
-
line-height: var(--yee-input-line-height);
|
|
52
|
+
// line-height: var(--yee-input-line-height);
|
|
53
53
|
background-color: inherit;
|
|
54
54
|
border: none;
|
|
55
55
|
outline: none;
|
|
@@ -246,7 +246,18 @@ const Selector = React.forwardRef(
|
|
|
246
246
|
return null;
|
|
247
247
|
}
|
|
248
248
|
return (
|
|
249
|
-
<span
|
|
249
|
+
<span
|
|
250
|
+
className={`${prefixCls}-clear`}
|
|
251
|
+
role="button"
|
|
252
|
+
aria-label="clear"
|
|
253
|
+
tabIndex={0}
|
|
254
|
+
onClick={handleClear}
|
|
255
|
+
onKeyDown={(e) => {
|
|
256
|
+
if (e.key === 'Enter') {
|
|
257
|
+
handleClear(e as unknown as React.MouseEvent<HTMLSpanElement>);
|
|
258
|
+
}
|
|
259
|
+
}}
|
|
260
|
+
>
|
|
250
261
|
<X size={12} strokeWidth={1} />
|
|
251
262
|
</span>
|
|
252
263
|
);
|
|
@@ -49,12 +49,12 @@ export default function useFilter({
|
|
|
49
49
|
return handled.find((o) => {
|
|
50
50
|
if (Array.isArray(o.value)) {
|
|
51
51
|
return o.value.some((v) => {
|
|
52
|
-
const t = item[o.dataIndex];
|
|
52
|
+
const t = item[o.dataIndex] || '';
|
|
53
53
|
return (t as string).toLowerCase() === v.toLowerCase();
|
|
54
54
|
});
|
|
55
55
|
} else {
|
|
56
56
|
const v = o.value.toLowerCase();
|
|
57
|
-
const t = item[o.dataIndex];
|
|
57
|
+
const t = item[o.dataIndex] || '';
|
|
58
58
|
return (t as string).toLowerCase().includes(v);
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -175,7 +175,7 @@ const HeaderFilter = React.memo((props: any) => {
|
|
|
175
175
|
<Search size={14} strokeWidth={1.5} />
|
|
176
176
|
)
|
|
177
177
|
}
|
|
178
|
-
variant={selectNodes.length ? 'filled' : undefined}
|
|
178
|
+
variant={selectNodes.length || searchValue ? 'filled' : undefined}
|
|
179
179
|
type="text"
|
|
180
180
|
size="small"
|
|
181
181
|
/>
|