venus-design 0.8.9 → 0.9.0
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.
|
@@ -5,7 +5,7 @@ import "./styles.less";
|
|
|
5
5
|
* @param dataIndex
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
export declare const getColumnSearchNewProps: (dataIndex: string, title: string) => {
|
|
8
|
+
export declare const getColumnSearchNewProps: (dataIndex: string, title: string, onFilter: Boolean) => {
|
|
9
9
|
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }: {
|
|
10
10
|
setSelectedKeys: any;
|
|
11
11
|
selectedKeys: any;
|
|
@@ -38,7 +38,7 @@ var handleSearch = function handleSearch(selectedKeys, confirm, dataIndex, onFil
|
|
|
38
38
|
* @param dataIndex
|
|
39
39
|
* @returns
|
|
40
40
|
*/
|
|
41
|
-
export var getColumnSearchNewProps = function getColumnSearchNewProps(dataIndex, title) {
|
|
41
|
+
export var getColumnSearchNewProps = function getColumnSearchNewProps(dataIndex, title, _onFilter) {
|
|
42
42
|
return {
|
|
43
43
|
//@ts-ignore
|
|
44
44
|
filterDropdown: function filterDropdown(_ref) {
|
|
@@ -98,7 +98,7 @@ export var getColumnSearchNewProps = function getColumnSearchNewProps(dataIndex,
|
|
|
98
98
|
}));
|
|
99
99
|
},
|
|
100
100
|
onFilter: function onFilter(value, record) {
|
|
101
|
-
return record[dataIndex] ? record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()) : '';
|
|
101
|
+
return _onFilter ? record[dataIndex] ? record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()) : '' : {};
|
|
102
102
|
}
|
|
103
103
|
//render: (text:string) => text
|
|
104
104
|
};
|
|
@@ -26,7 +26,7 @@ export var VENUS_TABLE_COLUMNFILTER_TYPE = {
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
"text": function text(column) {
|
|
29
|
-
return _objectSpread({}, getColumnSearchNewProps(handleDataIndex(column.fieldId || "", column), column.fieldName || ""));
|
|
29
|
+
return _objectSpread({}, getColumnSearchNewProps(handleDataIndex(column.fieldId || "", column), column.fieldName || "", column.parameterSource != undefined && column.parameterSource.onFilter != undefined ? column.parameterSource.onFilter : true));
|
|
30
30
|
},
|
|
31
31
|
"date": function date(column) {
|
|
32
32
|
return _objectSpread({}, getColumnDateSearchProps(column.fieldId || ""));
|