Open seansfkelley opened 7 years ago
Oh this sounds interesting. Will dig in this week. 👍
Man, I'm just not seeing what's going on with this one. For some reason, when selectAll()
invokes Table.handleSelection
(a private helper), the state
is not updated before componentWillReceiveProps
is invoked.
Fortunately, passing the selectedRegions
back into Table
in a controlled fashion fixes the issue.
Bug report
Steps to reproduce
Using this table-containing component:
Actual behavior
Expected behavior
Commenting out the
this.setState
line causes selection to behave as expected again. Wrappingthis.setState
in a zero-durationsetTimeout
also causes selection to behave as expected. Looks like some kind of synchronicity/deferral issue?Confusingly, all other types of selection work (entire-row, entire-column, single-cell, multiple-cell).