javascript - How to reset selected items from the list? -


in component of office 365 fabric reactjs exists such component. has _getselectiondetails() method counts selected items list want make method reset , deselect items in list. example have button , when press it, reset items in list, marked before. tried :

_resetselecteditems() :{  this.setstate ({ selectiondetails: 0 })  } 

after call it, sets new state , sets 0, items selected before remain selected, diselecting doesn't happen. how can deselect items?

this.setstate() performs shallow merge of this.state new state, e.g. if this.state have selectiondetails , many more objects. this.setstate ({ selectiondetails: 0 }) update selectiondetails other remain unchange. have cleanup other objects manually.

ref : this.setstate

update :

finally got it.... this._selection.setallselected(false) work.

check out github project or check online.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -