We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorder columns by dragging and dropping columns will have issues when the table has fixed columns first
If the table has first two fixed columns and I drag 2023-08-07 to the middle of 2023-08-08 and 2023-08-09, 2023-08-07 will be below the 2023-08-09.
If the table doesn't have the fixed columns, it can work as expected.
The column 2023-08-07 can be between 2023-08-08 and 2023-08-09 after draging.
const [newColumns, setNewColumns] = useState([{"title":"WS1_HB_NUM","dataIndex":"hardBinNum","key":"hardBinNum","rowScope":"row","width":20,"fixed":"left","isShowDeltaMenu":false},{"title":"WS1_HB_DESCP","dataIndex":"hardBinDescp","key":"WS1_HB_DESCP","rowScope":"row","width":20,"fixed":"left","isShowDeltaMenu":false},{"title":"2023-08-28","dataIndex":"yieldNum2023-08-28","key":"yieldNum2023-08-28","width":50},{"title":"2023-08-19","dataIndex":"yieldNum2023-08-19","key":"yieldNum2023-08-19","width":50},{"title":"2023-08-08","dataIndex":"yieldNum2023-08-08","key":"yieldNum2023-08-08","width":50},{"title":"2023-08-18","dataIndex":"yieldNum2023-08-18","key":"yieldNum2023-08-18","width":50},{"title":"2023-08-25","dataIndex":"yieldNum2023-08-25","key":"yieldNum2023-08-25","width":50},{"title":"2023-08-12","dataIndex":"yieldNum2023-08-12","key":"yieldNum2023-08-12","width":50},{"title":"2023-08-15","dataIndex":"yieldNum2023-08-15","key":"yieldNum2023-08-15","width":50},{"title":"2023-09-03","dataIndex":"yieldNum2023-09-03","key":"yieldNum2023-09-03","width":50},{"title":"2023-09-01","dataIndex":"yieldNum2023-09-01","key":"yieldNum2023-09-01","width":50},{"title":"2023-08-10","dataIndex":"yieldNum2023-08-10","key":"yieldNum2023-08-10","width":50},{"title":"2023-08-30","dataIndex":"yieldNum2023-08-30","key":"yieldNum2023-08-30","width":50},{"title":"2023-08-16","dataIndex":"yieldNum2023-08-16","key":"yieldNum2023-08-16","width":50},{"title":"2023-09-05","dataIndex":"yieldNum2023-09-05","key":"yieldNum2023-09-05","width":50},{"title":"2023-08-29","dataIndex":"yieldNum2023-08-29","key":"yieldNum2023-08-29","width":50},{"title":"2023-08-13","dataIndex":"yieldNum2023-08-13","key":"yieldNum2023-08-13","width":50},{"title":"2023-08-07","dataIndex":"yieldNum2023-08-07","key":"yieldNum2023-08-07","width":50},{"title":"2023-09-02","dataIndex":"yieldNum2023-09-02","key":"yieldNum2023-09-02","width":50},{"title":"2023-08-26","dataIndex":"yieldNum2023-08-26","key":"yieldNum2023-08-26","width":50},{"title":"2023-08-27","dataIndex":"yieldNum2023-08-27","key":"yieldNum2023-08-27","width":50},{"title":"2023-08-22","dataIndex":"yieldNum2023-08-22","key":"yieldNum2023-08-22","width":50},{"title":"2023-08-24","dataIndex":"yieldNum2023-08-24","key":"yieldNum2023-08-24","width":50},{"title":"2023-08-31","dataIndex":"yieldNum2023-08-31","key":"yieldNum2023-08-31","width":50},{"title":"2023-08-21","dataIndex":"yieldNum2023-08-21","key":"yieldNum2023-08-21","width":50},{"title":"2023-09-04","dataIndex":"yieldNum2023-09-04","key":"yieldNum2023-09-04","width":50},{"title":"2023-08-23","dataIndex":"yieldNum2023-08-23","key":"yieldNum2023-08-23","width":50},{"title":"2023-08-20","dataIndex":"yieldNum2023-08-20","key":"yieldNum2023-08-20","width":50},{"title":"2023-08-11","dataIndex":"yieldNum2023-08-11","key":"yieldNum2023-08-11","width":50},{"title":"2023-08-17","dataIndex":"yieldNum2023-08-17","key":"yieldNum2023-08-17","width":50},{"title":"2023-08-14","dataIndex":"yieldNum2023-08-14","key":"yieldNum2023-08-14","width":50},{"title":"2023-08-09","dataIndex":"yieldNum2023-08-09","key":"yieldNum2023-08-09","width":50}]) const [newData, setNewData] = useState([{"hardBinNum":"Unit Count","color":"transparent","key":0,"yieldNum2023-08-28":0,"yieldNum2023-08-19":0,"yieldNum2023-08-08":0,"yieldNum2023-08-18":0,"yieldNum2023-08-25":0,"yieldNum2023-08-12":0,"yieldNum2023-08-15":0,"yieldNum2023-09-03":0,"yieldNum2023-09-01":0,"yieldNum2023-08-10":0,"yieldNum2023-08-30":0,"yieldNum2023-08-16":0,"yieldNum2023-09-05":0,"yieldNum2023-08-29":0,"yieldNum2023-08-13":0,"yieldNum2023-08-07":0,"yieldNum2023-09-02":0,"yieldNum2023-08-26":0,"yieldNum2023-08-27":0,"yieldNum2023-08-22":0,"yieldNum2023-08-24":0,"yieldNum2023-08-31":0,"yieldNum2023-08-21":0,"yieldNum2023-09-04":0,"yieldNum2023-08-23":0,"yieldNum2023-08-20":0,"yieldNum2023-08-11":0,"yieldNum2023-08-17":0,"yieldNum2023-08-14":0,"yieldNum2023-08-09":0}]);
<DragSortTable id = {'paretoTable'} columns={newColumns} dataSource={[...newData]} bordered pagination = {false} size = 'small' search={false} dragSortKey="sort" options={{ reload: false, density: false }} rowKey ="key" />
The text was updated successfully, but these errors were encountered:
@chenshuai2144
Sorry, something went wrong.
38a5cbc
No branches or pull requests
π bug ζθΏ°
Reorder columns by dragging and dropping columns will have issues when the table has fixed columns first
π· ε€η°ζ₯ιͺ€ | Recurrence steps
If the table has first two fixed columns and I drag 2023-08-07 to the middle of 2023-08-08 and 2023-08-09, 2023-08-07 will be below the 2023-08-09.
If the table doesn't have the fixed columns, it can work as expected.
π ζζη»ζ | Expected results
The column 2023-08-07 can be between 2023-08-08 and 2023-08-09 after draging.
π» ε€η°δ»£η | Recurrence code
const [newColumns, setNewColumns] = useState([{"title":"WS1_HB_NUM","dataIndex":"hardBinNum","key":"hardBinNum","rowScope":"row","width":20,"fixed":"left","isShowDeltaMenu":false},{"title":"WS1_HB_DESCP","dataIndex":"hardBinDescp","key":"WS1_HB_DESCP","rowScope":"row","width":20,"fixed":"left","isShowDeltaMenu":false},{"title":"2023-08-28","dataIndex":"yieldNum2023-08-28","key":"yieldNum2023-08-28","width":50},{"title":"2023-08-19","dataIndex":"yieldNum2023-08-19","key":"yieldNum2023-08-19","width":50},{"title":"2023-08-08","dataIndex":"yieldNum2023-08-08","key":"yieldNum2023-08-08","width":50},{"title":"2023-08-18","dataIndex":"yieldNum2023-08-18","key":"yieldNum2023-08-18","width":50},{"title":"2023-08-25","dataIndex":"yieldNum2023-08-25","key":"yieldNum2023-08-25","width":50},{"title":"2023-08-12","dataIndex":"yieldNum2023-08-12","key":"yieldNum2023-08-12","width":50},{"title":"2023-08-15","dataIndex":"yieldNum2023-08-15","key":"yieldNum2023-08-15","width":50},{"title":"2023-09-03","dataIndex":"yieldNum2023-09-03","key":"yieldNum2023-09-03","width":50},{"title":"2023-09-01","dataIndex":"yieldNum2023-09-01","key":"yieldNum2023-09-01","width":50},{"title":"2023-08-10","dataIndex":"yieldNum2023-08-10","key":"yieldNum2023-08-10","width":50},{"title":"2023-08-30","dataIndex":"yieldNum2023-08-30","key":"yieldNum2023-08-30","width":50},{"title":"2023-08-16","dataIndex":"yieldNum2023-08-16","key":"yieldNum2023-08-16","width":50},{"title":"2023-09-05","dataIndex":"yieldNum2023-09-05","key":"yieldNum2023-09-05","width":50},{"title":"2023-08-29","dataIndex":"yieldNum2023-08-29","key":"yieldNum2023-08-29","width":50},{"title":"2023-08-13","dataIndex":"yieldNum2023-08-13","key":"yieldNum2023-08-13","width":50},{"title":"2023-08-07","dataIndex":"yieldNum2023-08-07","key":"yieldNum2023-08-07","width":50},{"title":"2023-09-02","dataIndex":"yieldNum2023-09-02","key":"yieldNum2023-09-02","width":50},{"title":"2023-08-26","dataIndex":"yieldNum2023-08-26","key":"yieldNum2023-08-26","width":50},{"title":"2023-08-27","dataIndex":"yieldNum2023-08-27","key":"yieldNum2023-08-27","width":50},{"title":"2023-08-22","dataIndex":"yieldNum2023-08-22","key":"yieldNum2023-08-22","width":50},{"title":"2023-08-24","dataIndex":"yieldNum2023-08-24","key":"yieldNum2023-08-24","width":50},{"title":"2023-08-31","dataIndex":"yieldNum2023-08-31","key":"yieldNum2023-08-31","width":50},{"title":"2023-08-21","dataIndex":"yieldNum2023-08-21","key":"yieldNum2023-08-21","width":50},{"title":"2023-09-04","dataIndex":"yieldNum2023-09-04","key":"yieldNum2023-09-04","width":50},{"title":"2023-08-23","dataIndex":"yieldNum2023-08-23","key":"yieldNum2023-08-23","width":50},{"title":"2023-08-20","dataIndex":"yieldNum2023-08-20","key":"yieldNum2023-08-20","width":50},{"title":"2023-08-11","dataIndex":"yieldNum2023-08-11","key":"yieldNum2023-08-11","width":50},{"title":"2023-08-17","dataIndex":"yieldNum2023-08-17","key":"yieldNum2023-08-17","width":50},{"title":"2023-08-14","dataIndex":"yieldNum2023-08-14","key":"yieldNum2023-08-14","width":50},{"title":"2023-08-09","dataIndex":"yieldNum2023-08-09","key":"yieldNum2023-08-09","width":50}])
const [newData, setNewData] = useState([{"hardBinNum":"Unit Count","color":"transparent","key":0,"yieldNum2023-08-28":0,"yieldNum2023-08-19":0,"yieldNum2023-08-08":0,"yieldNum2023-08-18":0,"yieldNum2023-08-25":0,"yieldNum2023-08-12":0,"yieldNum2023-08-15":0,"yieldNum2023-09-03":0,"yieldNum2023-09-01":0,"yieldNum2023-08-10":0,"yieldNum2023-08-30":0,"yieldNum2023-08-16":0,"yieldNum2023-09-05":0,"yieldNum2023-08-29":0,"yieldNum2023-08-13":0,"yieldNum2023-08-07":0,"yieldNum2023-09-02":0,"yieldNum2023-08-26":0,"yieldNum2023-08-27":0,"yieldNum2023-08-22":0,"yieldNum2023-08-24":0,"yieldNum2023-08-31":0,"yieldNum2023-08-21":0,"yieldNum2023-09-04":0,"yieldNum2023-08-23":0,"yieldNum2023-08-20":0,"yieldNum2023-08-11":0,"yieldNum2023-08-17":0,"yieldNum2023-08-14":0,"yieldNum2023-08-09":0}]);
<DragSortTable
id = {'paretoTable'}
columns={newColumns}
dataSource={[...newData]}
bordered
pagination = {false}
size = 'small'
search={false}
dragSortKey="sort"
options={{
reload: false,
density: false
}}
rowKey ="key"
/>
Β© Version Info
The text was updated successfully, but these errors were encountered: