What problem does this address?
It is currently difficult to create custom DataViews layouts using the newly exported individual components (DataViews.Search, DataViews.Filters, DataViews.FiltersToggle) because these components depend on DataViewsContext which is not exported.
When trying to reassemble DataViews with custom layouts, we cannot:
- Access
isShowingFilter state needed to conditionally render the Filters component
- Coordinate between FiltersToggle and Filters components
- Access other shared state like
openedFilter, fields, view, and data
This prevents the composability that the v8 individual component exports seem to enable.
What is your proposed solution?
Export DataViewsContext from the main package:
export { DataViewsContext } from './components/dataviews-context';
This would allow developers to:
- Use
useContext(DataViewsContext) to access shared state
- Create fully custom layouts while reusing the official filter/search components
- Properly coordinate component interactions through the context
The context export would complete the composability story started by exporting the individual components.
What problem does this address?
It is currently difficult to create custom DataViews layouts using the newly exported individual components (
DataViews.Search,DataViews.Filters,DataViews.FiltersToggle) because these components depend onDataViewsContextwhich is not exported.When trying to reassemble DataViews with custom layouts, we cannot:
isShowingFilterstate needed to conditionally render the Filters componentopenedFilter,fields,view, anddataThis prevents the composability that the v8 individual component exports seem to enable.
What is your proposed solution?
Export
DataViewsContextfrom the main package:This would allow developers to:
useContext(DataViewsContext)to access shared stateThe context export would complete the composability story started by exporting the individual components.