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

Check/Uncheck all not working on IE/Edge

Open hlosappio opened this issue 8 years ago • 13 comments

Hi,

I implemented a react-bootstrap-table on my app. I have data, some rows are unselectable.

it works great on every browser, except for IE and Edge. I can easily check all, but not unckeck. Sometimes after 3/4 click it works, sometimes it never works.

I can reproduce this bug on your example page : http://allenfang.github.io/react-bootstrap-table/example.html#selection on "Unselectable Row" and "Multi Selection"

I really appreciate any help you can provide.

hlosappio avatar Apr 26 '17 08:04 hlosappio

ok, got it, I'll find some time to reproduce this issue. but I need a windows firstly... ;(

AllenFang avatar Apr 26 '17 08:04 AllenFang

I may have some hints about the cause of this issue.

If i redefine selectRow.onSelectAll(isSelected, rows) {...}and log the isSelected parameter, its value is always equal totrue`, whether all the non-disabled lines are selected or not under ie/edge.

QLevaslot avatar May 26 '17 15:05 QLevaslot

i am also facing the same problem.

EktaDevop avatar Jul 24 '17 11:07 EktaDevop

https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js#L687 This is always returning checked = true in IE11.

Suman-Plivo avatar Jul 26 '17 06:07 Suman-Plivo

yes I also facing the same issue, how to fix it ?

cy5781 avatar Sep 13 '17 03:09 cy5781

I've run into this issue as well.

It makes having the selectRow feature enabled essentially useless, at least for my case. Does anyone have a work around or an update as to when this will be resolved?

Thanks!

ghost avatar Feb 20 '18 20:02 ghost

@tholmes7, I'm facing the same issue. Did you find any work around for this?

nlicht avatar Mar 06 '18 18:03 nlicht

@nlicht , no unfortunately not. I resorted to disabling the feature in IE/Edge because my specific case is only exposed to a small subset of users that all use chrome.

ghost avatar Mar 06 '18 18:03 ghost

@AllenFang is this fixed in react-bootstrap-table2?

nlicht avatar Mar 20 '18 09:03 nlicht

@AllenFang - forget it, I see It works on the live demo. Thanks!

nlicht avatar Mar 20 '18 11:03 nlicht

@AllenFang

Also facing this issue on multiple projects. It is reproducing when there is more than one page in a grid, IE11/Edge browser only.

Did some investigation, here are the results.

The issue is caused by the line: https://github.com/AllenFang/react-bootstrap-table/blob/26d07defab759e4f9bce22d1d568690830b8d9d7/src/BootstrapTable.js#L798 In IE it is always true as stated by people above, that's why it's not possible to "Deselect All" after "Select All" action.

The thing here is (when you click on the checked+indeterminate input):

  • In Chrome: = e.currentTarget.checked === false = onChange event will be triggered = checkbox control will be unchecked

  • In IE11/Edge (first click): = e.currentTarget.checked === true = onChange event will not be triggered = checkbox control will be checked

  • When second click: = e.currentTarget.checked === false = onChange event will be triggered = checkbox control will be unchecked

Example to play with: https://jsfiddle.net/6azgk2cx/1/

I will try to come up with pull request to fix this issue, but need some time.

oprohonnyi avatar May 21 '18 20:05 oprohonnyi

Have you found any solution to fix this?

ChiaraSammarco avatar Sep 17 '18 08:09 ChiaraSammarco

Any chance of a solution and/or workaround for this?

andrew-regan avatar Apr 03 '19 14:04 andrew-regan