diff --git a/src/app/components/fluentui_color_picker.tsx b/src/app/components/fluentui_color_picker.tsx index 612283e3..44cb3474 100644 --- a/src/app/components/fluentui_color_picker.tsx +++ b/src/app/components/fluentui_color_picker.tsx @@ -91,6 +91,15 @@ export class ColorPicker extends React.Component< currentPicker: null, }; } + + //REMOVE TO OPEN COLOR PALETTE BY DEFAULT VALUE + //OPEN DEFAULT COLOR PALETTE + this.state = { + currentPalette: predefinedPalettes.filter( + (x) => x.name == "Palette/ColorBrewer" + )[0], + currentPicker: null, + }; } public render() { @@ -103,6 +112,14 @@ export class ColorPicker extends React.Component< <> + x.type == "palette")} + selected={this.state.currentPalette} + onClick={(p) => { + this.setState({ currentPalette: p, currentPicker: null }); + this.props.parent?.forceUpdate(); + }} + /> - x.type == "palette")} - selected={this.state.currentPalette} - onClick={(p) => { - this.setState({ currentPalette: p, currentPicker: null }); - this.props.parent?.forceUpdate(); - }} - />