CYS: add debounce to improve performance (#46212)

* CYS: add debounce to improve performance

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Luigi Teschio 2024-04-04 12:19:56 +02:00 committed by GitHub
parent 5129811c85
commit 96c9180671
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { unlock } from '@wordpress/edit-site/build-module/lock-unlock';
import { useContext } from '@wordpress/element';
import { mergeBaseAndUserConfigs } from '@wordpress/edit-site/build-module/components/global-styles/global-styles-provider';
import { debounce } from 'lodash';
const {
useGlobalStyle,
@ -57,7 +58,7 @@ export const ColorPanel = () => {
<StylesColorPanel
inheritedValue={ inheritedStyle }
value={ style }
onChange={ onChange }
onChange={ debounce( onChange, 100 ) }
settings={ settings }
/>
);

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Comment: CYS: add debounce to improve performance