DEV Community

Discussion on: Building a Multi-Range Slider in React From Scratch

Collapse
 
ashish21 profile image
Ashish-21

Thanks! It was good learning of react and usage of ref.

Can you please elloborate z-index condition in first input tag : zIndex: minVal > max - 100 && "5" . Also it is not working when we are using react with typescript.

Thanks!

Collapse
 
sandra_lewis profile image
Sandra Lewis • Edited

Check out this image: dev-to-uploads.s3.amazonaws.com/up...
I've explained the reason why the inline z-index style is needed over there, hope that clears your doubt.

I did this initially with TypeScript and it worked. The only difference is you got to specify the types.
Here's the TypeScript version: codesandbox.io/s/b9l0g

Collapse
 
ashish21 profile image
Ashish-21

Thank you so much for explanation and typescript code.It was great learning experience.😊

Thread Thread
 
sandra_lewis profile image
Sandra Lewis

You're welcome, glad it helped 😊