@hzab/list-render 1.12.3-alpha.0 → 1.12.3-alpha.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.
- package/CHANGELOG.md +5 -1
- package/package.json +2 -2
- package/src/FilterTag/index.tsx +2 -1
- package/src/list-render.jsx +1 -0
- package/src/table-render/index.jsx +3 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hzab/list-render",
|
|
3
|
-
"version": "1.12.3-alpha.
|
|
3
|
+
"version": "1.12.3-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src",
|
|
6
6
|
"scripts": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"lodash": ">=4.17.21",
|
|
62
62
|
"react": ">=16.8.0",
|
|
63
63
|
"react-dom": ">=16.8.0",
|
|
64
|
-
"@hzab/edit-table": "
|
|
64
|
+
"@hzab/edit-table": ">=0.1.2"
|
|
65
65
|
},
|
|
66
66
|
"directories": {
|
|
67
67
|
"lib": "lib"
|
package/src/FilterTag/index.tsx
CHANGED
|
@@ -6,7 +6,7 @@ function hasValue(val) {
|
|
|
6
6
|
return val !== null && val !== undefined;
|
|
7
7
|
}
|
|
8
8
|
const FilterTag = (props: any) => {
|
|
9
|
-
const { searchQuery, schema, queryRef } = props;
|
|
9
|
+
const { searchQuery, schema, queryRef, onSearch } = props;
|
|
10
10
|
const [worldList, setWorldList] = useState<any>([]);
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (queryRef) {
|
|
@@ -34,6 +34,7 @@ const FilterTag = (props: any) => {
|
|
|
34
34
|
queryRef.current?.formRef?.current?.formRender.setValues({
|
|
35
35
|
[item?.filed]: null,
|
|
36
36
|
});
|
|
37
|
+
onSearch && onSearch(queryRef.current?.formRef?.current?.formRender?.values);
|
|
37
38
|
setWorldList((pre) => pre?.filter((el) => el?.filed != item?.filed));
|
|
38
39
|
};
|
|
39
40
|
|
package/src/list-render.jsx
CHANGED
|
@@ -501,6 +501,7 @@ const ListRender = forwardRef(function (props, parentRef) {
|
|
|
501
501
|
searchQuery={searchQuery}
|
|
502
502
|
schema={schema}
|
|
503
503
|
queryRef={queryRef}
|
|
504
|
+
onSearch={onSearch}
|
|
504
505
|
></FilterTag>
|
|
505
506
|
}
|
|
506
507
|
{Slots.HeaderOthersSuffix && <Slots.HeaderOthersSuffix onSearch={onSearch} getList={getList} />}
|
|
@@ -41,7 +41,8 @@ const TableRender = forwardRef(function (props, tableRef) {
|
|
|
41
41
|
const cellEditTableRef = useRef()
|
|
42
42
|
useImperativeHandle(tableRef, () => ({
|
|
43
43
|
onEditByTable,
|
|
44
|
-
cellEditTableRef
|
|
44
|
+
cellEditTableRef,
|
|
45
|
+
columns
|
|
45
46
|
}));
|
|
46
47
|
|
|
47
48
|
const [columns, setColumns] = useState([]);
|
|
@@ -294,7 +295,7 @@ const TableRender = forwardRef(function (props, tableRef) {
|
|
|
294
295
|
hasDelTips && typeof hasDelTips === "function" ? hasDelTips(record, index) : hasDelTips || tableDelTip;
|
|
295
296
|
|
|
296
297
|
return (
|
|
297
|
-
<div style={{ width: _colConf?.width, maxWidth: "100%" }}>
|
|
298
|
+
<div style={{ width: _colConf?.width, maxWidth: "100%" }} className="table-render-action">
|
|
298
299
|
{Slots?.actionPrefixSlot && <Slots.actionPrefixSlot {...slotProps} />}
|
|
299
300
|
{_hasDetail ? (
|
|
300
301
|
<Button
|