You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use prime react datatable in my project, three menu items "当天检查", "门诊His", "急诊His" have different columns. I switch in 3 items, the different table columns will be switched. But if I reorder table columns in item "门诊His", and switch to item "急诊His", the table columns' order will be showed same as last item "门诊His". This behavior is wrong.
The reason is that in file https://github.com/primefaces/primereact/blob/master/components/lib/datatable/DataTable.js
getColumns(ignoreReorderable) {
if (!ignoreReorderable && this.props.reorderableColumns && this.state.columnOrder) {
let orderedColumns = this.state.columnOrder.reduce((arr, columnKey) => {
const column = this.findColumnByKey(columns, columnKey);
column && arr.push(column);
return arr;
}, []);
The param "this.state.columnOrder" in different datatables are same, this is wrong.
This param in item "急诊His" datatable should be undefined, but not detail value.
I use below temporary solution to fix above issue. #1088
The text was updated successfully, but these errors were encountered:
I use prime react datatable in my project, three menu items "当天检查", "门诊His", "急诊His" have different columns. I switch in 3 items, the different table columns will be switched. But if I reorder table columns in item "门诊His", and switch to item "急诊His", the table columns' order will be showed same as last item "门诊His". This behavior is wrong.
The reason is that in file https://github.com/primefaces/primereact/blob/master/components/lib/datatable/DataTable.js
getColumns(ignoreReorderable) {
if (!ignoreReorderable && this.props.reorderableColumns && this.state.columnOrder) {
let orderedColumns = this.state.columnOrder.reduce((arr, columnKey) => {
const column = this.findColumnByKey(columns, columnKey);
column && arr.push(column);
return arr;
}, []);
}
The param "this.state.columnOrder" in different datatables are same, this is wrong.
This param in item "急诊His" datatable should be undefined, but not detail value.
I use below temporary solution to fix above issue.
#1088
The text was updated successfully, but these errors were encountered: