Naeemur / react-native-wheel-color-picker

A color picker component for react native.
94 stars 51 forks source link

Changing component props and default values not working #23

Closed Gnash-Obial closed 2 years ago

Gnash-Obial commented 2 years ago

I can't seem to update the discreteLength and palettes props to a specific or desired value.

Version of react-native-wheel-color-picker ^1.1.0

Version of react-native 0.65.1

Platforms you faced the error (IOS or Android or both?) IOS and Android

Expected behavior Replacing discreteLength: 10 to 6 would display only 6 shades from swatch along with replacing color palettes to desired colors.

Actual behavior Does nothing basically.

Tested environment (Emulator? Real Device?) Emulator

Steps to reproduce the behavior Replace the props with desired values. <ColorPicker color={color} onColorChangeComplete={(color) => setColor(color)} swatchesLast={false} sliderSize={30} thumbSize={30} discrete={true} discreteLength={6} palette={PALETTE} />

const PALETTE = ['#ed1c24', '#d11cd5', '#1633e6', '#00c85d', '#ffde17'];

Naeemur commented 2 years ago

The prop discreteLength was added in v1.2.0 release. You should update the installed package and check.