From 0ae4f1fae0f0abea4c00c69fa248494fece32f2c Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 30 Aug 2026 12:26:12 +0100 Subject: [PATCH] Enhance Filter Functionality Across Dashboard Components - Updated FilterInput, FilterSidebar, ObjectTable, SimpleDateTimePropertyFilter, and SimplePropertyFilter components to support new filter and masterFilter props, improving data filtering capabilities. - Introduced ObjectTableFilterContext for better state management of filter values across components, enhancing the overall user experience. - Refactored getModelPropertyValues function in ApiServerContext to accept filter parameters, allowing for more dynamic data fetching based on user-defined filters. - Improved loading and visibility handling in SimpleDateTimePropertyFilter and SimplePropertyFilter to optimize performance during data retrieval. --- .../Dashboard/common/FilterInput.jsx | 15 ++- .../Dashboard/common/FilterSidebar.jsx | 2 + .../Dashboard/common/ObjectTable.jsx | 28 +++- .../common/ObjectTableFilterContext.jsx | 3 + .../common/SimpleDateTimePropertyFilter.jsx | 76 ++++++++++- .../Dashboard/common/SimplePropertyFilter.jsx | 121 +++++++++++++++--- .../Dashboard/context/ApiServerContext.jsx | 20 ++- 7 files changed, 235 insertions(+), 30 deletions(-) create mode 100644 src/components/Dashboard/common/ObjectTableFilterContext.jsx diff --git a/src/components/Dashboard/common/FilterInput.jsx b/src/components/Dashboard/common/FilterInput.jsx index 5d323114..041d7693 100644 --- a/src/components/Dashboard/common/FilterInput.jsx +++ b/src/components/Dashboard/common/FilterInput.jsx @@ -442,7 +442,9 @@ const FilterInput = ({ onBlur, onPressEnter, size, - propertyFilter = null + propertyFilter = null, + filter = {}, + masterFilter = {} }) => { const { getPrefixCls, direction } = useContext(ConfigProvider.ConfigContext) const prefixCls = getPrefixCls('input') @@ -895,6 +897,10 @@ const FilterInput = ({ propertyName={propertyFilter.propertyName} value={propertyFilterValue} onChange={handlePropertyFilterChange} + filter={filter} + masterFilter={masterFilter} + visible={true} + useTableFilter={false} /> @@ -1146,7 +1152,8 @@ const FilterInput = ({ {propertyFilterEnabled && (