Skip to content

Commit

Permalink
DataViews: Fix pattens list selection (WordPress#63733)
Browse files Browse the repository at this point in the history
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
3 people authored Jul 19, 2024
1 parent 5d4bf27 commit 6b0b4e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/edit-site/src/components/page-patterns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export default function DataviewsPatterns() {
const {
params: { postType, categoryId: categoryIdFromURL },
} = useLocation();
const [ selection, setSelection ] = useState( [] );
const type = postType || PATTERN_TYPES.user;
const categoryId = categoryIdFromURL || PATTERN_DEFAULT_CATEGORY;
const [ view, setView ] = useState( DEFAULT_VIEW );
Expand Down Expand Up @@ -409,6 +410,8 @@ export default function DataviewsPatterns() {
isLoading={ isResolving }
view={ view }
onChangeView={ setView }
selection={ selection }
onChangeSelection={ setSelection }
defaultLayouts={ defaultLayouts }
/>
</Page>
Expand Down

0 comments on commit 6b0b4e4

Please sign in to comment.