ar-design 0.2.3 → 0.2.4
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.
|
@@ -149,19 +149,6 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
|
|
|
149
149
|
};
|
|
150
150
|
});
|
|
151
151
|
}, []);
|
|
152
|
-
const handleChecboxFilter = async () => {
|
|
153
|
-
if (config.isServerSide) {
|
|
154
|
-
if (_searchTimeOut.current)
|
|
155
|
-
clearTimeout(_searchTimeOut.current);
|
|
156
|
-
setSearchedParams(checkboxSelectedParams);
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
setSearchedText(checkboxSelectedParams);
|
|
160
|
-
}
|
|
161
|
-
setCurrentPage(1);
|
|
162
|
-
pagination && pagination.onChange(1);
|
|
163
|
-
setSelectedfilterCheckboxItems(_filterCheckboxItems.current.filter((x) => x?.checked).length);
|
|
164
|
-
};
|
|
165
152
|
// Derinlemesine arama yapmak için özyinelemeli bir fonksiyon tanımlayalım.
|
|
166
153
|
const deepSearch = (item, searchedText) => {
|
|
167
154
|
if (!searchedText)
|
|
@@ -224,6 +211,19 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
|
|
|
224
211
|
searchedParams(_searchedParams, query);
|
|
225
212
|
}
|
|
226
213
|
}, [_searchedParams]);
|
|
214
|
+
useEffect(() => {
|
|
215
|
+
if (config.isServerSide) {
|
|
216
|
+
if (_searchTimeOut.current)
|
|
217
|
+
clearTimeout(_searchTimeOut.current);
|
|
218
|
+
setSearchedParams(checkboxSelectedParams);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
setSearchedText(checkboxSelectedParams);
|
|
222
|
+
}
|
|
223
|
+
setCurrentPage(1);
|
|
224
|
+
pagination && pagination.onChange(1);
|
|
225
|
+
setSelectedfilterCheckboxItems(_filterCheckboxItems.current.filter((x) => x?.checked).length);
|
|
226
|
+
}, [checkboxSelectedParams]);
|
|
227
227
|
useEffect(() => {
|
|
228
228
|
if (!selections)
|
|
229
229
|
return;
|
|
@@ -299,10 +299,7 @@ const TableWithRef = forwardRef(({ children, title, description, data, columns,
|
|
|
299
299
|
React.createElement("div", null, c.filters.map((filter, fIndex) => {
|
|
300
300
|
const name = typeof c.key !== "object" ? String(c.key) : String(c.key.field);
|
|
301
301
|
return (React.createElement("div", null,
|
|
302
|
-
React.createElement(Checkbox, { ref: (element) => (_filterCheckboxItems.current[fIndex] = element), label: filter.text, name: name, status: "primary", value: filter.value, checked: checkboxSelectedParams?.[name]?.includes(String(filter.value)), onChange: async (event) =>
|
|
303
|
-
await handleCheckboxChange(event);
|
|
304
|
-
await handleChecboxFilter();
|
|
305
|
-
} })));
|
|
302
|
+
React.createElement(Checkbox, { ref: (element) => (_filterCheckboxItems.current[fIndex] = element), label: filter.text, name: name, status: "primary", value: filter.value, checked: checkboxSelectedParams?.[name]?.includes(String(filter.value)), onChange: async (event) => await handleCheckboxChange(event) })));
|
|
306
303
|
}))), windowBlur: true },
|
|
307
304
|
(selectedfilterCheckboxItems ?? 0) > 0 && (React.createElement("div", { style: {
|
|
308
305
|
position: "absolute",
|