Skip to content

Commit

Permalink
Merge pull request #702 from gadget-inc/mill/AddAutoTableSearchValueP…
Browse files Browse the repository at this point in the history
…aram

Added `searchValue` property to `AutoTable` component to control the table's search value
  • Loading branch information
MillanWangGadget authored Dec 2, 2024
2 parents b837efd + 4a9726f commit 4a28217
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react/.changeset/eleven-carrots-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gadgetinc/react": patch
---

Added `searchValue` property to `AutoTable` component to control the table's search value
1 change: 1 addition & 0 deletions packages/react/src/auto/AutoTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ export type AutoTableProps<
resourceName?: { singular: string; plural: string };
condensed?: boolean;
searchable?: boolean;
searchValue?: string;
paginate?: boolean;
};
1 change: 1 addition & 0 deletions packages/react/src/auto/polaris/PolarisAutoTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const PolarisAutoTableComponent = <
live: props.live,
initialSort: props.initialSort,
filter: props.filter,
search: props.searchValue,
} as any);

const { columns, rows, page, fetching, error, search, selection, sort, metadata, data: rawRecords } = methods;
Expand Down

0 comments on commit 4a28217

Please sign in to comment.