Update FormHandler Table
Setup:
-
Clone the repo: https://code.gramener.com/s.anand/g1 - formhandler branch
-
Run the repo: run Gramex on root and visit
/test/test-formhandler.html
-
The output we want to create is at https://learn.gramener.com/guide/formhandler/flags?_format=table
-
The code for this output is at https://code.gramener.com/s.anand/gramex/blob/dev/gramex/apps/formhandler/formhandler.table.html
-
Change
src/formhandler.js
andsrc/formhandler.template.html
to deliver the output's functionality -
When changing the source, run
npm run build
to create the output -
When a filter is applied by clicking on the table, display the applied filters on the top right. Use the same CSS style as formhandler table - Clicking on the applied filter should clear that filter and only that filter
- Clicking on the little red cross at the end should clear all column filters (not
_format
or others)
-
Clicking on a column name should show a dropdown with: - Sort ascending:
href="?_sort=<col-name>"
- Sort descending:
href="?_sort=-<col-name>"
- Test filters: TBD
- Format: TBD
- Hide:
href="?c=-<col-name>" data-mode="add"
-- remove the column fully and show it in the applied filters section on the top right
- Sort ascending:
-
Column formatting