NProTable
The advanced table is designed to address the issue of writing repetitive boilerplate code for tables in projects. It encapsulates many common logic and behaviors. These encapsulations can be simply classified into preset actions and preset logic.
If your table needs to interact with the server or requires different cell styles, ProTable is the perfect choice. However, if you just need to render a basic table, we recommend using data-table or table.
Props
Name | Type | Default | Description |
---|---|---|---|
instance | ProTableInstance | - | The instance of the component |
pagination | boolean | PaginationProps | true | Pagination configuration |
For more parameters, refer to data-table.
Methods (table)
Name | Type | Description |
---|---|---|
pagination | OffsetPagination | Pagination configuration for the table |
next | () => void | Go to the next page and make the corresponding request |
prev | () => void | Go to the previous page and make the corresponding request |
search | (pagination?: ServerPaginationResolve) => Promise<void> | Request content based on pagination information |
reset | () => Promise<void> | Reset the page number and make a new request |
request | (pagination: ServerPaginationResolve) => DataResolved<T> | Promise<DataResolved<T>> | Source request function |
requestAll | () => Promise<T> | Request all data based on page-related information, usually used for combining .csv files |