react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Table not updating when formatter is setted

Open Genarito opened this issue 8 years ago • 23 comments

My column setting are these:

columns = {
    dataField: 'inexistentField',
    text: "Obj state",
    formatter: (cell, obj) => {
        console.log('Obj -> ', obj); // Only executed when on table change function is executed by table
    }
}

Table does not update when I call my tableChange function (one that is passed down to onTableChange) externally (not using one of the page buttons).

When I click on any sortable column, content generated by formatter function changes normally. If data changes a lot (for instance, with different number of elements) table works fine. I've debugged with React Dev Tools and my state and table props are correct.

Version bootstrap-table: 1.3.0

Genarito avatar Oct 25 '18 18:10 Genarito

I think codesandboxes of it not working would be helpful to get problems fixed or to see what you might be doing wrong. In addition a 2nd codesandbox that contains your workarounds actually working would be much more useful...

waynebrantley avatar Apr 30 '20 15:04 waynebrantley

Thanks Wayne. I'll be looking for a non-hack solution. If I find one, I'll share it here.

cliff-bentley avatar Apr 30 '20 19:04 cliff-bentley