Skip to content

Commit

Permalink
feat: Fix Color changes to be in sync with rest of the block.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuj-Rathore24 committed Oct 29, 2024
1 parent 26123cd commit e563cec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/latest-comments/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ export default function LatestComments( { attributes, setAttributes } ) {
// the block appears on the frontend. Setting the locale
// explicitly prevents any middleware from setting it to 'user'.
urlQueryArgs={ { _locale: 'site' } }
/**
* The `key` prop is set to a combination of `backgroundColor` and `textColor` attributes.
* This forces the <ServerSideRender> component to update.
*/
key={ `${ attributes.backgroundColor || 'default' }-${
attributes.textColor || 'default'
}` }
/>
</Disabled>
</div>
Expand Down

0 comments on commit e563cec

Please sign in to comment.