I’m using Primereact DataTable component in my react project.
After resized column I’m trying to get resized width but always get initial fix width.
Initially style applied to TH element in DataTable
element.style {
width: 150px;
position: sticky;
}
After column resized style applied to TH by CSS class
.p-datatable[pr_id_1] .p-datatable-thead > tr > th:nth-child(1), .p-datatable[pr_id_1] .p-
datatable-tbody > tr > td:nth-child(1), .p-datatable[pr_id_1] .p-datatable-tfoot > tr >
td:nth-child(1) {
flex: 1 1 498px !important;
}
I can see updated width un Dev tool in above style but how to read it using java script code.
If anyone used primereact DatataTable please suggest me Is there any way in Primereact DataTable to get actual column width after resized.