UNPKG

react-antd-admin-panel

Version:

Modern TypeScript-first React admin panel builder with Ant Design 6

35 lines 840 B
import { List } from '../list'; /** * Create a mock List with test configuration */ export function createMockList(options = {}) { const list = new List(); // Set row key if (options.rowKey) { list.rowKey(options.rowKey); } else { list.rowKey('id'); } // Set data source if (options.empty) { list.dataSource([]); } else if (options.data) { list.dataSource(options.data); } // Set loading state if (options.loading !== undefined) { list.loading(options.loading); } // Set pagination if (options.pagination !== undefined) { list.pagination(options.pagination); } // Set empty text if (options.emptyText) { list.emptyText(options.emptyText); } return list; } //# sourceMappingURL=createMockList.js.map