React States with react-tabulator
Title QUESTION: Why react class setState({}) always affect react-tabulator states? Like rowClick, cellClick events with setState, server side initial sort and many more. In my project I used a lot of tabulator objects to manipulate my logics and codes but when I use react states everything are gone (e.g putting classname to elements, adding properties or attributes to row, cell, data objects and clicking the row with table scroll makes me go back at the top).
Can someone explain it to me. Maybe I loose some concepts with regards to react or tabulator?
TIA!
Environment Details
- react-tabulator version: 0.15.0
Missing a boolean that identifies if you are working directly on the state or via ajax Temporarily fix it by editing ReactTabulator.js
Comment these lines
/*if (!Utils_1.isSameArray(prevState.columns, this.state.columns)) { // only when data is really different: call this.table.setData (will re-render table) this.table && this.table.setColumns(this.state.columns); }*/ /*if (!Utils_1.isSameObject(prevState.options, this.state.options)) { // console.log('options changed', this.state.options); this.initTabulator(); }*/
Hello @ivanmdh ,
Care to explain more? That would help me a lot. And if I comment this line, that would fix the entire problems that I'm currently facing or it's just the react data states or tabulator ajax?
Thank you!