Hello I’m using react and I have a Raw data table next to a custom UI to show data for specific fields, I need my custom UI component to display data based on the columns currently pinned by the user in the Raw data table. How can I detect when a column’s pinned status changes so I can update my UI accordingly
Detect column pinning in Raw data table
emoya
#2
I see, well, there sis an event called rdt:columnPinned that you can use, this event is triggered when a column is pinned by dragging and dropping the column to the left or right, let me show you an example of how you can use it for your use case:
//your chart definition here..., then:
yourChart.on("rdt:columnPinned", event => {
// the column that is being pinned
const pinnedColumn = event.data.columns[0].colDef.field;
// the position of the pinned column
const position = event.data.pinned;
})