feat(admin): 模型排序 - 支持搜索并移动到指定位置
This commit is contained in:
1 parent
4e0b0a9256
commit
17a2618ba5
6 files changed
+51
-8
No files matched your search
@@ -51,5 +51,8 @@ test("sorting exposes a simple settings entry and moves items without changing t
|
||||
expect(moveOrderItem(rows, "c", 0).map((item) => item.id)).toEqual(["c", "a", "b"]);
|
||||
expect(moveOrderItem(rows, "a", 2).map((item) => item.id)).toEqual(["b", "c", "a"]);
|
||||
expect(moveOrderItem(rows, "a", -1)).toBe(rows);
|
||||
expect(moveOrderItem(rows, "a", 1.5)).toBe(rows);
|
||||
expect(moveOrderItem(rows, "a", Number.NaN)).toBe(rows);
|
||||
expect(moveOrderItem(rows, "a", rows.length)).toBe(rows);
|
||||
expect(rows.map((item) => item.id)).toEqual(["a", "b", "c"]);
|
||||
});
|
||||
Reference in new issue
Block a user