我正在寻找一种灵活的方式来帮助我重新排列列表中的项目。我有向用户显示数据的网格。我希望能够让用户重新排列列,以便以最适合单个用户的方式显示数据。我的网格使用这样的布局
"Data": [
{
"colId": "e98006d4-d262-4c63-b93e-3941bb53ed9e",
"headerName": "DocId",
"field": "DocId",
"width": 100,
"sortable": false,
"hide": false,
"position": 0
},
{
"colId": "d78a564c-12f8-4298-859a-690dd5cb61d0",
"headerName": "assignedTo",
"field": "assignedTo",
"width": 100,
"sortable": false,
"hide": false,
"position": 1
},
{
"colId": "4bae45f3-410f-45fb-b8df-9110d49c08d5",
"headerName": "assignedTo_name",
"field": "assignedTo_name",
"width": 100,
"sortable": false,
"hide": false,
"position": 2
},
{
"colId": "bb1270bf-050b-4556-8a0a-77ddee9b1a98",
"headerName": "created_by",
"field": "created_by",
"width": 100,
"sortable": false,
"hide": false,
"position": 3
}]
那么,如果说用户将位置3的created_by移动到位置1,那将是最好的处理方式?