Compare commits

...

2 Commits

Author SHA1 Message Date
Hein
9f960a6729 RELEASING: Releasing 1 package(s)
Releases:
  @warkypublic/oranguru@0.0.14

[skip ci]
2025-10-30 10:47:21 +02:00
Hein
864188c599 docs(changeset): Added searchfields 2025-10-30 10:47:19 +02:00
4 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# @warkypublic/zustandsyncstore # @warkypublic/zustandsyncstore
## 0.0.14
### Patch Changes
- 864188c: Added searchfields
## 0.0.13 ## 0.0.13
### Patch Changes ### Patch Changes

View File

@ -1,7 +1,7 @@
{ {
"name": "@warkypublic/oranguru", "name": "@warkypublic/oranguru",
"author": "Warky Devs", "author": "Warky Devs",
"version": "0.0.13", "version": "0.0.14",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -90,6 +90,7 @@ export interface GridlerProps extends PropsWithChildren {
rowHeight?: number; rowHeight?: number;
scrollToRowKey?: number; scrollToRowKey?: number;
searchFields?: Array<string>;
searchStr?: string; searchStr?: string;
sections?: { sections?: {
bottom?: React.ReactNode; bottom?: React.ReactNode;

View File

@ -35,6 +35,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
const pageSize = getState('pageSize'); const pageSize = getState('pageSize');
const colFilters = getState('colFilters'); const colFilters = getState('colFilters');
const searchStr = getState('searchStr'); const searchStr = getState('searchStr');
const searchFields = getState('searchFields');
const _active_requests = getState('_active_requests'); const _active_requests = getState('_active_requests');
setState('loadingData', true); setState('loadingData', true);
try { try {
@ -72,7 +73,12 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
if (searchStr && searchStr !== '') { if (searchStr && searchStr !== '') {
columns columns
?.filter((f) => !f.disableFilter && !f.disableSearch) ?.filter(
(f) =>
!f.disableFilter &&
!f.disableSearch &&
((searchFields ?? []).length == 0 || searchFields?.includes(f.id))
)
?.forEach((filter: any) => { ?.forEach((filter: any) => {
ops.push({ ops.push({
name: `${filter.id}`, name: `${filter.id}`,