Skip to content

Commit

Permalink
fix: fragment id was not triggering component update #2628
Browse files Browse the repository at this point in the history
  • Loading branch information
preda-bogdan committed Apr 13, 2021
1 parent 36923bc commit af59bc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions inc/customizer/controls/react/src/common/ColorControl.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import PropTypes from 'prop-types';
import GlobalColorsPicker from '../common/GlobalColorsPicker';
import { ColorPicker, Button, Dropdown } from '@wordpress/components';
// we can add back ColorPicker here when issue https://github.com/WordPress/gutenberg/issues/30798 is resolved
import { Button, Dropdown } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';

import ColorPickerFix from './ColorPickerDebug';

const ColorControl = ({
label,
selectedColor,
Expand Down Expand Up @@ -67,7 +70,7 @@ const ColorControl = ({
<>
{/* eslint-disable-next-line jsx-a11y/anchor-has-content */}
<a href="#color-picker" />
<ColorPicker
<ColorPickerFix
color={selectedColor}
onChangeComplete={handleChange}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const PaletteColors = ({ values, defaults, save }) => {
<div className="color-array-wrap">
{globalPaletteColors.map((group, index) => {
return (
<Fragment key={index}>
<Fragment key={activePalette + '_' + index}>
{index > 0 && <hr />}
{Object.keys(group).map((slug) => {
return (
Expand Down

0 comments on commit af59bc9

Please sign in to comment.