UNPKG

starh-comp-common

Version:

Libreria di componenti React specifica per la piattaforma StarH.

83 lines (65 loc) 2.52 kB
# React UI Components Libreria di componenti React specifica per la piattaforma StarH. ## Elenco Componenti AjaxTable.propTypes = { endpoint: PropTypes.string.isRequired, // enpoint da invocare per recuperare i dati requestHeaders: PropTypes.object, onLoad: PropTypes.func, dataKey: PropTypes.string, emptyMessage: PropTypes.string, currentPageReportTemplate: PropTypes.string, paginatorTemplate: PropTypes.string, rowsPerPageOptions: PropTypes.array, rows: PropTypes.number, filteredText: PropTypes.string, borderColor: PropTypes.string, totalRecordsLabel: PropTypes.string, fullTextSearchLabel: PropTypes.string, fullTextSearchOperator: PropTypes.string, exportLabel: PropTypes.string, advancedSearchLabel: PropTypes.string, advancedSearchBarTitle: PropTypes.string, columns: PropTypes.arrayOf( PropTypes.shape({ header: PropTypes.string.isRequired, field: PropTypes.string.isRequired, sortable: PropTypes.bool, sortableField: PropTypes.string, renderer: PropTypes.func, }), ).isRequired, fullTextSearchFields: PropTypes.arrayOf(PropTypes.string), exportFields: PropTypes.arrayOf( PropTypes.shape({ header: PropTypes.string.isRequired, field: PropTypes.string.isRequired, }), ), advancedSearchFields: PropTypes.arrayOf( PropTypes.shape({ header: PropTypes.string.isRequired, field: PropTypes.string.isRequired, }), ), }; AjaxTable.defaultProps = { onLoad: (data) => { return data; }, dataKey: 'id', emptyMessage: 'No data', currentPageReportTemplate: 'Showing {first} to {last} of {totalRecords} entries', paginatorTemplate: 'CurrentPageReport FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown', rowsPerPageOptions: [10, 20, 50], rows: 10, borderColor: '#dddddd', totalRecordsLabel: 'Total Records:', fullTextSearchLabel: 'Search ...', fullTextSearchOperator: 'like', filteredText: '(filtered)', exportLabel: 'Export', advancedSearchLabel: 'Search (Ctrl+f)', advancedSearchBarTitle: 'Advanced Search', }; Crafted with 💗 by LinearIT.