File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ class BootstrapTable extends Component {
399
399
let result = true ;
400
400
if ( this . props . selectRow . onSelectAll ) {
401
401
result = this . props . selectRow . onSelectAll ( isSelected ,
402
- isSelected ? this . store . get ( ) : [ ] ) ;
402
+ isSelected ? this . store . get ( ) : this . store . getRowByKey ( this . state . selectedRowKeys ) ) ;
403
403
}
404
404
405
405
if ( typeof result == 'undefined' || result !== false ) {
Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ export class TableDataStore {
85
85
this . selected = selectedRowKeys ;
86
86
}
87
87
88
+ getRowByKey ( keys ) {
89
+ return keys . map ( key => {
90
+ const result = this . data . filter ( d => d [ this . keyField ] === key ) ;
91
+ if ( result . length !== 0 ) return result [ 0 ] ;
92
+ } ) ;
93
+ }
94
+
88
95
getSelectedRowKeys ( ) {
89
96
return this . selected ;
90
97
}
You can’t perform that action at this time.
0 commit comments