24ark / react-native-step-indicator

A simple react-native implementation of step indicator widget compatible with the ViewPager and ListView.
Apache License 2.0
1.43k stars 312 forks source link

Custom styles won't update #31

Closed timolins closed 6 years ago

timolins commented 6 years ago

It's not possible to update styles after the component has been constructed. This is could be solved by storing the customStyles inside the component's state. This way it should respond to style changes.

PriyankaAshu commented 6 years ago

Can I know is it possible now to update customStyles dynamically ? I Have set my styles in state and using the same in customStyles prop in StepIndicator.

                            return  <StepIndicator
                               customStyles={this.state.ongoingCustomProps}
                               currentPosition={3}
                               labels={labels}
                               stepCount = {5}
                          />

But the colors are not reflecting/changing. but stepCount, currentPosition and labels are changing.

timolins commented 6 years ago

Yes, I submitted a pull request which adds support for dynamic styling! Sadly it hasn't been merged yet, but you can install it directly.

https://github.com/24ark/react-native-step-indicator/pull/32