From 42e8aa1451ad7edb6988a372e00ec8be004230b8 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 22 Sep 2023 14:44:57 +1200 Subject: [PATCH] Reset pagination if filter changes --- .../block-editor/src/components/block-patterns-list/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-patterns-list/index.js b/packages/block-editor/src/components/block-patterns-list/index.js index 07310451a0c225..ba4afa1c7334d8 100644 --- a/packages/block-editor/src/components/block-patterns-list/index.js +++ b/packages/block-editor/src/components/block-patterns-list/index.js @@ -151,13 +151,15 @@ function BlockPatternList( { showTitlesAsTooltip, currentCategoryPatterns, category, + patternFilter, } ) { const composite = useCompositeState( { orientation } ); const container = useRef(); const pagingProps = usePatternsPaging( currentCategoryPatterns, category, - container + container, + patternFilter ); const { categoryPatternsAsyncList: shownPatterns,