File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/react-bootstrap-table2-filter/src/components Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,18 @@ function optionsEquals(currOpts, prevOpts) {
1818 return Object . keys ( currOpts ) . length === Object . keys ( prevOpts ) . length ;
1919}
2020
21- const getSelections = container =>
22- Array . from ( container . selectedOptions ) . map ( item => item . value ) ;
21+ const getSelections = ( container ) => {
22+ if ( container . selectedOptions ) {
23+ return Array . from ( container . selectedOptions ) . map ( item => item . value ) ;
24+ }
25+ const selections = [ ] ;
26+ const totalLen = container . options . length ;
27+ for ( let i = 0 ; i < totalLen ; i += 1 ) {
28+ const option = container . options . item ( i ) ;
29+ if ( option . selected ) selections . push ( option . value ) ;
30+ }
31+ return selections ;
32+ } ;
2333
2434class MultiSelectFilter extends Component {
2535 constructor ( props ) {
You can’t perform that action at this time.
0 commit comments