JSPM

  • Created
  • Published
  • Downloads 49
  • Score
    100M100P100Q64786F
  • License ISC

Table/list sorter

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ng-paginable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    PaginableTableComponent This component represents a table that can be paginated and sorted, with an optional search bar and batch actions.

    Inputs id?: string (optional) - the id of the component. showSearchInput: boolean = true - whether to show the search input. options: PaginableTableOptions (optional) - options for the table. cursor is set to 'default' and hoverableRows is set to false by default. headers: Array<PaginableTableHeader | string> - an array of table headers. The headers can be provided as an array of PaginableTableHeader objects or an array of strings. If an array of strings is provided, the headers will be mapped to PaginableTableHeader objects with the title and property set to the same string. The buttons, wrapping, onlyButtons, and align properties can also be set for each header. pagination: PaginableTablePagination | Observable - the data to be paginated. This can be an array of data to be paginated or an observable that emits an array of data to be paginated. If an observable is provided, the component will subscribe to it and update the data when it emits. rows: any[] - the data to be displayed in the table. If this input is provided, the component will not paginate the data and will display all the rows in the table. Outputs onSelected: EventEmitter - an event emitted when a row or multiple rows are selected or unselected. Properties loading: boolean - whether the table is currently loading data. errorOccurred: boolean - whether an error has occurred while loading data. lastColumnOnlyHasButtons: boolean - whether the last column of the table only has buttons. data: PaginableTablePagination - the paginated data to be displayed in the table. selectedItems: any[] - an array of the currently selected rows. allRowsSelected: boolean - whether all the rows in the current page are selected. selectable: boolean - whether rows can be selected. multiple: boolean - whether multiple rows can be selected. selectableProperty: string - the name of the property to return in the onSelected event. Methods markSelected(): void - marks the selected rows. Lifecycle hooks ngOnDestroy(): void - unsubscribes from observables when the component is destroyed.