react-bootstrap-table icon indicating copy to clipboard operation
react-bootstrap-table copied to clipboard

Conflict between tabIndex

Open mvscosta opened this issue 9 years ago • 12 comments

Hi Allen,

I'm having a problem in a page that contains more than one react-bootstrap-table and others input fields, because the tab index in always start with 1 and increment by 1 for next data and rows. The tables are in separated divs with panel class. Have any ideia to solve this problem, because when i try to navigate in the page with [tab] key doesn't work.

Thanks MVSC

mvscosta avatar Jun 09 '17 19:06 mvscosta

We are facing the same issue...

stephanebarbey avatar Jun 11 '17 15:06 stephanebarbey

have you tried the keyboard navigation feature? https://github.com/AllenFang/react-bootstrap-table/tree/master/examples/js/keyboard-nav

AllenFang avatar Jun 13 '17 15:06 AllenFang

Hi Allen,

I tried to use the keyboard navigation, but at the rows of table continuous to writing the tabindex element. I found a line in the component that create this element, my suggestion is change the line: tabIndex: tabIndex++ + '', to tabIndex: enableKeyBoardNav ? tabIndex++ + '' : '-1', Or something to don't create a element tabindex when dont enabled the keyboard nav. Another stuff needed is a way to set the start value of tabindex.

What you think about? Have another way to remove the tabindex? In my program actually i have dashboards with 8 - 10 tables.

Bests Vinicius

mvscosta avatar Jun 14 '17 20:06 mvscosta

How about give a props so that you can remote the tableIndex?

AllenFang avatar Jun 16 '17 15:06 AllenFang

Hi Allen,

Is a good way to make better the control of tabindex, but what do you do with auto increment "tabIndex: tabIndex++" implementation?

Thanks

mvscosta avatar Jun 29 '17 17:06 mvscosta

@mvscosta, if I provide a props to close the tableIndex, is that help to you? Sorry for lately reply lol

AllenFang avatar Jul 04 '17 15:07 AllenFang

@AllenFang, If this props remove the tabindex attribute for me is good. This implementation is so simple, don't solve anothers cases but for now is good.

mvscosta avatar Jul 05 '17 11:07 mvscosta

ok, I'll support it, thanks your response 👍

AllenFang avatar Jul 08 '17 07:07 AllenFang

@mvscosta this was fixed on v3.4.5, you can use withoutTabIndex on BootstrapTable to disable tabIndex, thanks

AllenFang avatar Jul 13 '17 15:07 AllenFang

@AllenFang I'm on v4.0.0-beta.7 and withoutTabIndex doesn't seem to be doing anything for me.

My table looks like

 <BootstrapTable data={data} withoutTabIndex>
      <TableHeaderColumn isKey dataField="Id" hidden>Id</TableHeaderColumn>
      <TableHeaderColumn dataField="FirstName">First Name</TableHeaderColumn>
      <TableHeaderColumn dataField="LastName">LastName</TableHeaderColumn>
 </BootstrapTable>

Is there something else I need to do? Or another way to override and disable tabindex

EDIT: Just 'downgraded' from v40.0.0-beta.7 to v3.4.5 and it worked fine there, I guess it just hasn't seen it's way into the betas yet. My apologies.

shogan94 avatar Jul 14 '17 16:07 shogan94

@shogan94 , yes, I'm not bump v4.0.0-beta.7 with v3.4.5 yet, I'll bump v4.x version in next few day, please wait, thanks :)

AllenFang avatar Jul 16 '17 05:07 AllenFang

v4.0.0 release.

AllenFang avatar Aug 06 '17 07:08 AllenFang