contributte / contributte/datagrid
SortableJS is not reinitialised when the grid is redrawn
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 296
- Forks
- 215
- PR merge metrics
- No merged PRs in 30d
Description
I think the sortable plugin mixes two concerns - updating some DOM after the sortable column headers are clicked and initializing the sortable drag&drop plugin. I think these should be split to separate plugins or at least make the sortable constructor argument optional.
In addition, there is a bug where the sortable is not reinitialised when payload._datagrid_sort is not set in the payload, this is set only when the filter form is submitted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with assets/plugins/integrations/sortable.ts and trace how the sortable constructor and DOM updates are handled after the grid is redrawn. Check the payload path involving payload._datagrid_sort, especially when it is absent because only the filter form was submitted. Done means sortable drag-and-drop is reinitialised after redraws and the plugin responsibilities or constructor argument are appropriately separated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100