CYS: Fix pattern rendering issues (#49041)
* CYS: Fix pattern rendering issues * Add changefile(s) from automation for the following project(s): woocommerce * fix import --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
60c4807e4b
commit
7b3434c8b5
|
@ -8,6 +8,7 @@ import {
|
|||
useRef,
|
||||
useState,
|
||||
} from '@wordpress/element';
|
||||
import { useAsyncList } from '@wordpress/compose';
|
||||
import { useSelect, useDispatch, select } from '@wordpress/data';
|
||||
import { BlockInstance, cloneBlock } from '@wordpress/blocks';
|
||||
import { close } from '@wordpress/icons';
|
||||
|
@ -108,6 +109,8 @@ export const SidebarPatternScreen = ( { category }: { category: string } ) => {
|
|||
);
|
||||
}, [ category, patterns ] );
|
||||
|
||||
const asyncSortedPatterns = useAsyncList( sortedPatterns );
|
||||
|
||||
const [ patternPagination, setPatternPagination ] = useState( 10 );
|
||||
|
||||
const refElement = useRef< HTMLDivElement >( null );
|
||||
|
@ -243,11 +246,11 @@ export const SidebarPatternScreen = ( { category }: { category: string } ) => {
|
|||
) }
|
||||
{ ! isSpinnerVisible && (
|
||||
<BlockPatternList
|
||||
shownPatterns={ sortedPatterns.slice(
|
||||
shownPatterns={ asyncSortedPatterns.slice(
|
||||
0,
|
||||
patternPagination
|
||||
) }
|
||||
blockPatterns={ sortedPatterns.slice(
|
||||
blockPatterns={ asyncSortedPatterns.slice(
|
||||
0,
|
||||
patternPagination
|
||||
) }
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
CYS: Fix pattern rendering issues
|
Loading…
Reference in New Issue