This is a web component built using stencil that tries to dynamically load values from api returning JSON Array
Given url returning JSON Array
, it will load and display your table, adding local search and pagination.
Just include:
<remote-table remote-url='https://jsonplaceholder.typicode.com/todos'
table-title="Json Typicode Table" footer-text="remote-table 0.1"></remote-table>
You need to add JQuery and DataTable manually
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"></script>
- Clone the repository
- Run
npm run build
to build component ornpm run start
to start local dev - Run
npm run storybook
to see the documentation with live example
- Remove JQuery dependency ( use GridJS.io )
- Add option for search & paginate url