techteec-lib
TypeScript icon, indicating that this package has built-in type declarations

0.5.4 • Public • Published

TechteecLib

techteec-lib/components

/data-table

Inputs
title: (string) Title of your data table
subtitle: (string) Subtitle of your data table
columnDefs: (ColumnDef[]) List of data table columns
data: (any[]) Current data
dataSize: (number) All data size
pageSize: (number) Initial page size
pageIndex: (number) Initial page index
filters: (DataTableFilter[]) request filters will be added to GeneralFilter model as key:value
haveSearch: (boolean) add SearchQuery to requests
isAsync: (boolean) Whether data will be refetched on each change or fetched once
sortActive: (string default: 'Id') Initial active sort column -user ColumnDef property-
sortDirection: ('asc' | 'desc' default: 'asc') Initial sort direction
isLoading: (boolean | null) Show data progress bar
menuLoadingRows: (number[]) Disable in action row
clickable: (boolean) Whether rows are clickable or not
btns: (DataTableButtonObject[]) Add buttons to the data table in order to give actions based on button index
preserveQueryParams: (boolean) Wether to preserve filter form values in url to go back to pr not
preserveSearchQuery: (boolean) Same as preserveQueryParams for SearchQuery
menuBtns: (DataTableButtonObject[]) add menu to each row
selectBtns: (DataTableButtonObject[]) add menu to selected rows
showSubmit: (boolean default: false) Whether to show submit button on filter form or not
isReport: (boolean default: false) Make the data table less density
searchQueryPlaceHolder: (string) Search control placeholder
haveSelect: (boolean) Whether data have select on rows or not
haveDownload: (boolean) Whether to add download data button or not
isDownloading: (boolean) true while downloading

Outputs
changed: (GeneralFilterModel) On each change in SearchQuery, Paginator, Sorting, Filters
rowClicked: (any) Fires when a row is clicked with current clicked element
btnClicked: (number) Return the index of clicked button of 'btns'
menuBtnClicked: (MenuClickEvent) Return row index,menu button index & current clicked object
selectBtnClicked: (SelectClickEvent) Return menu button index & all selected objects
downloadClicked: (GeneralFilterModel) Fires when the download button clicked

Readme

Keywords

none

Package Sidebar

Install

npm i techteec-lib

Weekly Downloads

0

Version

0.5.4

License

none

Unpacked Size

1.24 MB

Total Files

130

Last publish

Collaborators

  • amr.daoud