Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tabIndex to be set explicitly on Handle #381

Merged

Conversation

gvincentlh
Copy link
Contributor

@gvincentlh gvincentlh commented Dec 19, 2017

Basic implementation of tabIndex prop on the Handle component. Both Slider.js and Range.js also implement tabIndex, but in both cases it's simply passed through to the Handle. I've also updated the test suite with some simple checks to make sure tabIndex gets set properly on Handle from its parent. I've updated the README doc as well.

The default value for tabIndex is preserved (it's still "0"), so this change should not break any existing uses.

This is a fix for #353

cc: @paranoidjk

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.941% when pulling be3d775 on gvincentlh:gvincentlh/add-tabindex-prop into db32618 on react-component:master.

@paranoidjk paranoidjk merged commit 135c592 into react-component:master Jan 4, 2018
@gvincentlh
Copy link
Contributor Author

Thanks @paranoidjk and @yesmeck ! When can we expect a new release?

@gvincentlh gvincentlh deleted the gvincentlh/add-tabindex-prop branch January 4, 2018 18:27
@gvincentlh
Copy link
Contributor Author

@paranoidjk @yesmeck could we get another release with that change in it please?

@yesmeck
Copy link
Member

yesmeck commented Jan 9, 2018

Released [email protected]

@gvincentlh
Copy link
Contributor Author

Thanks!

@gvincentlh
Copy link
Contributor Author

@yesmeck I'm not seeing my changes reflected in the 8.6.0 dist files. Were they regenerated?

@yesmeck
Copy link
Member

yesmeck commented Jan 10, 2018

Yes, search tabIndex || 0 in this file https://unpkg.com/[email protected]/dist/rc-slider.js

@Shardendu-kantha
Copy link

I updated to 8.6.0 version, but passing tabIndex={-1} is still not setting tabindex=-1 for handles for Range.

<Range value={[minPrice, maxPrice]} min={this.minPriceRange} max={this.maxPriceRange} onChange={this._onPriceChange} onAfterChange={this._onPriceAfterChange} step={null} marks={this.state.priceSliderMarksObj} tabIndex={-1} />

@Robin-front
Copy link
Contributor

@Shardendu-kantha
<Range> expect an array for tabIndex prop. Different from <Slider>

tabIndex: PropTypes.arrayOf(PropTypes.number),

@Shardendu-kantha
Copy link

@Robin-front thank you so much. Got the solution. cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants