mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
fix: 排序字段中间态 orderDir 没有置空问题 (#4971)
Co-authored-by: srleng <srleng@gaojihealth.com>
This commit is contained in:
parent
066879f999
commit
c4cdef65f6
@ -279,7 +279,11 @@ export const TableStore = iRendererStore
|
||||
primaryField: 'id',
|
||||
orderBy: '',
|
||||
orderDir: types.optional(
|
||||
types.union(types.literal('asc'), types.literal('desc')),
|
||||
types.union(
|
||||
types.literal('asc'),
|
||||
types.literal('desc'),
|
||||
types.literal('')
|
||||
),
|
||||
'asc'
|
||||
),
|
||||
draggable: false,
|
||||
@ -1268,9 +1272,9 @@ export const TableStore = iRendererStore
|
||||
self.expandedRows.replace(rows.map(item => item.id));
|
||||
}
|
||||
|
||||
function setOrderByInfo(key: string, direction: 'asc' | 'desc') {
|
||||
function setOrderByInfo(key: string, direction: 'asc' | 'desc' | '') {
|
||||
self.orderBy = key;
|
||||
self.orderDir = direction;
|
||||
self.orderDir = key ? direction : '';
|
||||
}
|
||||
|
||||
function reset() {
|
||||
|
Loading…
Reference in New Issue
Block a user