fix(registry): sort data
This commit is contained in:
parent
8d9059ad32
commit
e3345d7be3
8 changed files with 444 additions and 266 deletions
36
src/interface/index/PropsTable.ts
Normal file
36
src/interface/index/PropsTable.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/** Namespace สำหรับ Table-related types */
|
||||
export namespace PropsTable {
|
||||
/** Interface สำหรับ pagination object */
|
||||
export interface Pagination {
|
||||
/** หน้าปัจจุบัน (เริ่มจาก 1) */
|
||||
page: number;
|
||||
/** จำนวนแถวต่อหน้า */
|
||||
rowsPerPage: number;
|
||||
/** จำนวนแถวทั้งหมด */
|
||||
rowsNumber?: number;
|
||||
/** คอลัมน์ที่ใช้ sort */
|
||||
sortBy?: string;
|
||||
/** เรียงจากมากไปน้อย */
|
||||
descending?: boolean;
|
||||
|
||||
rowsTotal?: number;
|
||||
}
|
||||
|
||||
/** Interface สำหรับ request props จาก d-table */
|
||||
export interface RequestProps {
|
||||
/** ข้อมูล pagination */
|
||||
pagination: Pagination;
|
||||
/** ตัวกรองข้อมูล */
|
||||
filter?: any;
|
||||
/** function สำหรับดึงค่าจาก cell */
|
||||
getCellValue?: (col: any, row: any) => any;
|
||||
}
|
||||
|
||||
/** Union type สำหรับ handleRequest function */
|
||||
export type HandleRequestProps = RequestProps;
|
||||
}
|
||||
|
||||
// Export แบบเดิมเพื่อ backward compatibility
|
||||
export type TablePagination = PropsTable.Pagination;
|
||||
export type TableRequestProps = PropsTable.RequestProps;
|
||||
export type HandleRequestProps = PropsTable.HandleRequestProps;
|
||||
Loading…
Add table
Add a link
Reference in a new issue