@arim-aisdc/public-components 2.3.24 → 2.3.25
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/components/BaseInfo/BaseInfo.d.ts +1 -1
- package/dist/components/TableMax/components/ColumnFilterV2/Filter.js +4 -1
- package/dist/components/TableMax/components/ColumnFilterV2/SingleSelect/index.js +4 -4
- package/dist/components/TableMax/components/ColumnFilterV2/index.less +9 -1
- package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string | Element |
|
|
20
|
+
text: string | JSX.Element | Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -163,7 +163,10 @@ var Filter = function Filter(_ref) {
|
|
|
163
163
|
fetchOptions(value);
|
|
164
164
|
}, 500), [fetchOptions]);
|
|
165
165
|
useEffect(function () {
|
|
166
|
-
if ([FilterType.MultiSelect
|
|
166
|
+
if ([FilterType.MultiSelect].includes(filterType)) {
|
|
167
|
+
// 打开后自动获取可选值
|
|
168
|
+
fetchOptions(columnFilterValue);
|
|
169
|
+
} else if ([FilterType.SingleSelect].includes(filterType)) {
|
|
167
170
|
// 打开后自动获取可选值
|
|
168
171
|
var _ref3 = columnFilterValue || {},
|
|
169
172
|
optionsParam = _ref3.optionsParam;
|
|
@@ -61,11 +61,12 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
61
61
|
optionsParam = _ref3.optionsParam;
|
|
62
62
|
setInnerValue(filterValue);
|
|
63
63
|
setInputSearchValue(optionsParam);
|
|
64
|
-
if (!isFrontSearch) {
|
|
65
|
-
|
|
66
|
-
}
|
|
64
|
+
// if (!isFrontSearch) {
|
|
65
|
+
// onSearch(optionsParam);
|
|
66
|
+
// }
|
|
67
67
|
}, [value]);
|
|
68
68
|
var handleInputChange = function handleInputChange(e) {
|
|
69
|
+
isFirstScroll.current = false;
|
|
69
70
|
var value = e.target.value;
|
|
70
71
|
setInputSearchValue(value);
|
|
71
72
|
if (!isFrontSearch) {
|
|
@@ -79,7 +80,6 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
79
80
|
function scrollToSelectedItem() {
|
|
80
81
|
var selectedElement = document.querySelector(".item[data-id=".concat(value.filterValue, "]"));
|
|
81
82
|
if (!selectedElement) return;
|
|
82
|
-
isFirstScroll.current = false;
|
|
83
83
|
if (selectedElement) {
|
|
84
84
|
selectedElement.scrollIntoView({
|
|
85
85
|
behavior: 'smooth',
|
|
@@ -10,15 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
.filter-panel-wrapper {
|
|
12
12
|
position: fixed;
|
|
13
|
-
z-index: 9999;
|
|
13
|
+
// z-index: 9999;
|
|
14
14
|
border-radius: 2px;
|
|
15
15
|
width: fit-content;
|
|
16
|
+
height: fit-content;
|
|
16
17
|
box-shadow: 0px 5px 12px 4px rgba(3, 6, 33, 0.15);
|
|
17
18
|
background: @tableSettingModalBgc;
|
|
18
19
|
// border: 1px solid #d9d9d9;
|
|
19
20
|
transform: translateX(-100%);
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
:global {
|
|
24
|
+
.ant-select-dropdown {
|
|
25
|
+
position: relative;
|
|
26
|
+
z-index: 9999;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
.single-com-wrapper {
|
|
23
31
|
padding: 8px 12px;
|
|
24
32
|
border-radius: 2px;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|