- Sort state: column and direction
- Sort state is set and reflected via observed attributes on action-table.
- Headers are turned into sort buttons which trigger sort state.
- Filter state: column and filter values
- Set with a filtersObj property which is an object (see FiltersObject in types.ts)
- To change filter state, call filterTable() method with or without arguments. Arguments will update filtersObj
- Right now, when filtersObj is changed nothing happens reactively. Ideally what should happen is:
- It should trigger filterTable() method.
- If filtersObj changed by actions-table-filter it should trigger filterTable() method but not update actions-table-filters elements.
- If however it is updated by something else like an auto reset then it should update actions-table-filters elements
- Pagination state: page number, number of rows per page, number of pages
- the actions-table-pagination needs to be render updated based on page number and number of pages
- actions-table needs to be updated based on page number and number of rows per page
- Right now it's all method calls
- actions-table-pagination buttons update page number
- actions-table filter updates number of pages based on number of displayed rows and can update page number if the current page is higher than the max page
- Ideal is a reactive property which would need trigger the above on changes. Might need a local state to test against the main state so that it doesn't trigger render when not needed.