Fix Bug 50903
This commit is contained in:
parent
dc50581e7c
commit
dcca2e189e
|
@ -45,7 +45,7 @@ const StandartColors = ({ options, standartColors, onColorClick, curColor }) =>
|
|||
)
|
||||
};
|
||||
|
||||
const CustomColors = ({ options, customColors, onColorClick, curColor }) => {
|
||||
const CustomColors = ({ options, customColors, isTypeColors, onColorClick, curColor }) => {
|
||||
const colors = customColors.length > 0 ? customColors : [];
|
||||
const emptyItems = [];
|
||||
if (colors.length < options.customcolors) {
|
||||
|
@ -64,7 +64,7 @@ const CustomColors = ({ options, customColors, onColorClick, curColor }) => {
|
|||
{colors && colors.length > 0 && colors.map((color, index) => {
|
||||
return(
|
||||
<a key={`dc-${index}`}
|
||||
className={curColor && curColor === color && index === indexCurColor ? 'active' : ''}
|
||||
className={curColor && curColor === color && index === indexCurColor && !isTypeColors ? 'active' : ''}
|
||||
style={{background: `#${color}`}}
|
||||
onClick={() => {onColorClick(color)}}
|
||||
></a>
|
||||
|
@ -100,6 +100,7 @@ const ThemeColorPalette = props => {
|
|||
themeColors[row].push(effect);
|
||||
});
|
||||
const standartColors = Common.Utils.ThemeColor.getStandartColors();
|
||||
let isTypeColors = standartColors.some( value => value === curColor );
|
||||
// custom color
|
||||
let customColors = props.customColors;
|
||||
if (customColors.length < 1) {
|
||||
|
@ -120,7 +121,7 @@ const ThemeColorPalette = props => {
|
|||
</ListItem>
|
||||
<ListItem className='dynamic-colors'>
|
||||
<div>{ _t.textCustomColors }</div>
|
||||
<CustomColors options={options} customColors={customColors} onColorClick={props.changeColor} curColor={curColor}/>
|
||||
<CustomColors options={options} isTypeColors={isTypeColors} customColors={customColors} onColorClick={props.changeColor} curColor={curColor}/>
|
||||
</ListItem>
|
||||
</List>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue