hrms-mgt/src/interface/index/PropsTable.ts
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 e3345d7be3 fix(registry): sort data
2025-09-23 17:24:54 +07:00

36 lines
1.3 KiB
TypeScript

/** 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;