0.3.7 • Published 6 years ago

@softledger/sl-table v0.3.7

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

SLTable

From src/SLTable.jsx

Extension of react-table to simplify for our standard use case

proptypedefaultrequireddescription
SubComponentFunction:x:Subcomponent to display when a table is expanded
columnsArray:white_check_mark:array describing how to display each key in data see react-table for full description
columns[].customFilter*:x:custom filter defined per react-table
columns[].myFilterEnum('Integer','Number','Date','StringAsInt','Text'):x:Predefined filter to use, defaults to 'Text';
dataArray:x:array of objects to display in the table
defaultSortedArray:x:default column to sort by
fetchDataFunction:white_check_mark:function to be called when we need to fetch new data ie, when page/limit is changed or filtered
getReportFunction:x:function which will return a csv of the data if blank, will hide menu buttons
onSaveTableFieldsFunction:x:callback which returns all visible headers useful to store default headers
pageSizeNumber:x:number of items to show per page
pagesNumber:x:total # of pages
showMenuBooleantrue:x:whether or not to display the column toggle menu
showOverflowBooleanfalse:x:true will allow inputs such as dropdowns etc to show

SelectTable

From src/SelectTable.jsx

Extension of react-table to simplify for our standard use case

proptypedefaultrequireddescription
SubComponentFunction:x:Subcomponent to display when a table is expanded
columnsArray:white_check_mark:array describing how to display each key in data see react-table for full description
columns[].customFilter*:x:custom filter defined per react-table
columns[].myFilterEnum('Integer','Number','Date','StringAsInt','Text'):x:Predefined filter to use, defaults to 'Text';
dataArray:x:array of objects to display in the table
defaultSortedArray:x:default column to sort by
fetchDataFunction:white_check_mark:function to be called when we need to fetch new data ie, when page/limit is changed or filtered
getReportFunction:x:function which will return a csv of the data if blank, will hide menu buttons
keyFieldString'_id':white_check_mark:column index to store in selection set
onSaveTableFieldsFunction:x:callback which returns all visible headers useful to store default headers
pageSizeNumber:x:number of items to show per page
pagesNumber:x:total # of pages
renderButtonFunction:white_check_mark:function which returns a button, called with selection set this.props.renderButton(selection)
selectionColorString'inherit':x:css color to highlight row when selected
showMenuBooleantrue:x:whether or not to display the column toggle menu
showOverflowBooleanfalse:x:true will allow inputs such as dropdowns etc to show

SimpleTable

From src/SimpleTable.jsx

proptypedefaultrequireddescription
SubComponentFunction:x:
columnsArray:white_check_mark:
dataArray:x:
defaultSortedArray:x:
loadingBoolean:x:
reportFileNameString:x:
showMenuBoolean:x:
0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago