react-semantic-ui-range icon indicating copy to clipboard operation
react-semantic-ui-range copied to clipboard

Disabling button and then enabling doesn't restore style

Open JeremiahChurch opened this issue 5 years ago • 5 comments

If the disabled attribute is set to true and then disabled the style components for the slider (but not the thumb knob) are lost rather than restored to what they were before being disabled.

codesandbox demonstrating issue https://codesandbox.io/s/reverent-sky-89iip?fontsize=14

I cruised through the code and didn't see any immediate reason why this might happen. I'll dig in to this next week but wanted to create an issue in case the reason might be obvious to someone else.

Thank you!

JeremiahChurch avatar Sep 22 '19 02:09 JeremiahChurch

Has there been any progress on this issue? Seems to still be occurring.

GarrickBrown avatar Dec 28 '19 14:12 GarrickBrown

@GarrickBrown I never got to the core of the issue and ended up working around it. I agree the issue is still present

JeremiahChurch avatar Dec 28 '19 17:12 JeremiahChurch

Thanks @JeremiahChurch, it is unfortunate as it's working so well otherwise

GarrickBrown avatar Dec 29 '19 00:12 GarrickBrown

Just an update on this issue, I was able to fix this issue by adding a key into the track fill that toggles with the "disabled" prop. https://github.com/KasselLabs/react-semantic-ui-range/commit/02817ab7bc3995d677dfce448b4557075f9d4d14

It is not the ideal solution but worked out with minimal impact.

But even though it worked, we've used our classNames solution on our fork in the end. Just sharing the knowledge in case anyone is having it too.

nihey avatar May 13 '20 23:05 nihey

This issue should be fixed by 0.7.1.

Issue caused by using background for disabled style instead of backgroundColor.

iozbeyli avatar Mar 16 '21 13:03 iozbeyli