- Issue created by @aaronpinero
- Status changed to Needs review
9 months ago 7:05pm 20 September 2023 - πΊπΈUnited States aaronpinero
I am adding a patch which seems to, at least in my limited manual testing, provide the solution. I updated the .module file to add a draggableviews_views_reset handler function. This function is a near exact copy of the draggableviews_views_submit function, except all the weight values are set to 0 when data is written to the database. I also updated the draggableviews_form_alter to add the reset button.
It would be great if a maintainer could take a look at this. I think this is an easy and sensible addition to the module.
- πΊπΈUnited States aaronpinero
I realize I provided an incorrect solution. I will update the patch so, to reset, the table rows are not written to the database in the reset handler.
- Status changed to Needs work
9 months ago 10:29pm 20 September 2023 - Status changed to Needs review
9 months ago 2:28pm 21 September 2023 - πΊπΈUnited States aaronpinero
Okay, I have provided an updated patch that, to reset a sort view, executes the deletion of rows from the db table but doesn't write any new data. I think this is more in keeping with the solution proposed in the original issue.