Compare commits
2 Commits
5fc02f9671
...
9f960a6729
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f960a6729 | ||
|
|
864188c599 |
@ -1,5 +1,11 @@
|
||||
# @warkypublic/zustandsyncstore
|
||||
|
||||
## 0.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 864188c: Added searchfields
|
||||
|
||||
## 0.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@warkypublic/oranguru",
|
||||
"author": "Warky Devs",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@ -90,6 +90,7 @@ export interface GridlerProps extends PropsWithChildren {
|
||||
|
||||
rowHeight?: number;
|
||||
scrollToRowKey?: number;
|
||||
searchFields?: Array<string>;
|
||||
searchStr?: string;
|
||||
sections?: {
|
||||
bottom?: React.ReactNode;
|
||||
|
||||
@ -35,6 +35,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
const pageSize = getState('pageSize');
|
||||
const colFilters = getState('colFilters');
|
||||
const searchStr = getState('searchStr');
|
||||
const searchFields = getState('searchFields');
|
||||
const _active_requests = getState('_active_requests');
|
||||
setState('loadingData', true);
|
||||
try {
|
||||
@ -72,7 +73,12 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
|
||||
if (searchStr && searchStr !== '') {
|
||||
columns
|
||||
?.filter((f) => !f.disableFilter && !f.disableSearch)
|
||||
?.filter(
|
||||
(f) =>
|
||||
!f.disableFilter &&
|
||||
!f.disableSearch &&
|
||||
((searchFields ?? []).length == 0 || searchFields?.includes(f.id))
|
||||
)
|
||||
?.forEach((filter: any) => {
|
||||
ops.push({
|
||||
name: `${filter.id}`,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user