mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-02 10:18:42 +00:00
[UI] Table column filters (#12103)
* Expose properties for column based filtering * Adjust renderers * Hide filter if name does not match * Allow multiple filters on same column * Better formatting * Add filtering support for multiple tables * Revert yarn.lock changes * Fix date input props * Updated column * Add filter to PartTable * Add playwright tests for new column filters * Update CHANGELOG * Updated docs * Reduce padding * Update more table filters * More filter columns * Adjust playwright test * Simplify playwright test * Robustify playwright tests * Add some delay * Add some buffer time
This commit is contained in:
@@ -23,7 +23,7 @@ export function TableColumnSelect({
|
||||
<Menu.Label>{t`Select Columns`}</Menu.Label>
|
||||
<Divider />
|
||||
{columns
|
||||
.filter((col) => col.switchable ?? true)
|
||||
.filter((col) => (col.switchable ?? true) && !col.propHidden)
|
||||
.map((col) => (
|
||||
<Menu.Item key={col.accessor}>
|
||||
<Checkbox
|
||||
|
||||
@@ -84,7 +84,7 @@ export type TableState = {
|
||||
* @param editable - Whether the value of this column can be edited
|
||||
* @param definition - Optional field definition for the column
|
||||
* @param render - A custom render function
|
||||
* @param filter - A custom filter function
|
||||
* @param filter - Filter name (string) to look up from tableFilters and attach an inline icon, or a custom render function for the filter popover
|
||||
* @param filtering - Whether the column is filterable
|
||||
* @param width - The width of the column
|
||||
* @param minWidth - The minimum width of the column
|
||||
@@ -109,7 +109,10 @@ export type TableColumnProps<T = any> = {
|
||||
editable?: boolean;
|
||||
definition?: ApiFormFieldType;
|
||||
render?: (record: T, index?: number) => any;
|
||||
filter?: any;
|
||||
filter?:
|
||||
| string
|
||||
| string[]
|
||||
| (({ close }: { close: () => void }) => ReactNode);
|
||||
filtering?: boolean;
|
||||
width?: number;
|
||||
minWidth?: string | number;
|
||||
|
||||
Reference in New Issue
Block a user