hxf31891 / react-gradient-color-picker

An easy to use color/gradient picker for React.js
MIT License
146 stars 49 forks source link

The ColorPicker component does not hide some of its children #103

Closed AchrafBn closed 2 weeks ago

AchrafBn commented 4 months ago

Hello,

I'm facing an issue with hiding some of the children in the Controls component. When I set the boolean props hideColorGuide, hideAdvancedSliders, and hideInputType in my component, those elements are not removed from the DOM

Basic code

function App() {

    const [color, setColor] = useState("rgba(255,255,255,1)");

    return (
        <div>
            <h2>Color picker</h2>
            <ColorPicker
                value={color}
                onChange={setColor}
                hideColorGuide
                hideAdvancedSliders
                hideInputType
            />
        </div>
    );
}

Environment

NodeJs: v20.12.2 Vite: v5.0.8 react: v18.2.0 react-best-gradient-color-picker: v3.0.10,

chrioniep commented 3 months ago

@AchrafBn I had the same problem, I downgraded to version @3.0.8 it fixed the problem

hxf31891 commented 2 weeks ago

@chrioniep @AchrafBn this should be resolved in v3.0.11