Documentation
Data Table
This package contains distribution files required to style DataTables library for jQuery with styling for Bootstrap5.For more details
Installing
npm i datatables.net-bs5
Data Table component
<table
className={"table " + className}
width="100%"
ref={tableRef}
iscolumnfilter={iscolumnfilter}
islanguagefilter={islanguagefilter}
></table>
Props
Prop is set the attriblute for the component.
Name | Detail |
---|---|
tableRef |
|
iscolumnfilter | The iscolumnfilter function is defined using useCallback to memoize the function and prevent unnecessary re-renders.The useEffect hook is used to create the DataTable instance, passing in the data, columns, and footerCallback options. |
islanguagefilter | This code appears to be using jQuery and DataTables.js libraries to create a multi-language table. It defines a function multiLanguage that checks if a table element with a selected language based on a dropdown select input with the ID langSelector. |
iscolumnhidden | The column visibility plug-in for Buttons provides a set of buttons that can be used to easily give the end user the ability to set the visibility of columns. |