align FilterList API with ObjectTable: objectType required, objectSet optional#2982
Draft
KuberSethi wants to merge 1 commit intomainfrom
Draft
align FilterList API with ObjectTable: objectType required, objectSet optional#2982KuberSethi wants to merge 1 commit intomainfrom
KuberSethi wants to merge 1 commit intomainfrom
Conversation
… optional add objectType as the primary required prop and make objectSet optional, matching the pattern used by ObjectTable. aggregation queries scope to the objectSet when provided, otherwise run against the full type.
Contributor
size-limit report 📦
|
ziyunp
reviewed
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Q: Why do we remove objectSet from all stories if it's now supported?
ziyunp
reviewed
Apr 10, 2026
| }); | ||
| const aggregationArgs = useMemo( | ||
| () => | ||
| objectSet != null |
Contributor
There was a problem hiding this comment.
Nit: Can we remove the ternary condition since the hook is handling empty objectSet anyway?
ziyunp
reviewed
Apr 10, 2026
| @@ -867,7 +851,6 @@ export const WithCheckbox: Story = { | |||
| function CombinedWithObjectTableStory( | |||
Contributor
There was a problem hiding this comment.
Add filtered objectSet example
Suggested change
| function CombinedWithObjectTableStory( | |
| function CombinedWithObjectTableStory( | |
| args: Partial<EmployeeFilterListProps>, | |
| ) { | |
| const client = useOsdkClient(); | |
| const employeeObjectSet = client(Employee).where({ | |
| jobProfile: "Marketing Manager", | |
| }); | |
| const [filterClause, setFilterClause] = useState< | |
| WhereClause<Employee> | undefined | |
| >(undefined); | |
| const handleFilterRemoved = useCallback((filterKey: string) => { | |
| // eslint-disable-next-line no-console | |
| console.log("Removed filter:", filterKey); | |
| }, []); | |
| return ( | |
| <div style={COMBINED_LAYOUT_STYLE}> | |
| <div style={SIDEBAR_FIXED_STYLE}> | |
| <FilterList | |
| objectType={Employee} | |
| objectSet={employeeObjectSet} | |
| filterDefinitions={sharedFilterDefinitions} | |
| onFilterRemoved={handleFilterRemoved} | |
| filterClause={filterClause} | |
| onFilterClauseChanged={setFilterClause} | |
| {...args} | |
| /> | |
| </div> | |
| <div style={FLEX_FILL_STYLE}> | |
| <ObjectTable | |
| objectType={Employee} | |
| filter={filterClause} | |
| objectSet={employeeObjectSet} | |
| /> | |
| </div> | |
| </div> | |
| ); | |
| } | |
ziyunp
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FilterList required objectSet as the sole data-source prop, diverging from ObjectTable's pattern
• add objectType as the primary required prop for metadata resolution, make objectSet optional for scoping aggregation queries
• conditionally pass objectSet to useOsdkAggregation so aggregations fall back to the full type when no objectSet is provided
• update stories, example app, and tests to use the new API