Table row weight does not update on reorder

Created on 16 April 2024, 10 months ago

Problem/Motivation

When manually reordering rows via drag and drop, the original row weights/order remain, both in the editing interface, as well as on the front end. So if a row was added as the fourth row originally, it will always show class "row_3", regardless of where you have reordered to.

This becomes a problem when we "Change the number of columns" . When reducing the number of rows, it will always remove the row with the highest weight, regardless of placement.

Steps to reproduce

  • Create a new, or use an existing tablefield.
  • Add content to 5 rows. Label ascending, 1, 2, 3, 4, 5.
  • Save content
  • Reorder rows via drag and drop, to descending, 5,4,3,2,1.
  • Save content
  • Use "change number of rows/columns" to reduce rows from 5, to 4.
  • Notice that the row labeled "5" is the one removed, even though it is now the first row/header.

Proposed resolution

Drag and drop should update the row order number for both frontend, and when rebuilding tables.

🐛 Bug report
Status

Active

Version

2.4

Component

Code

Created by

🇺🇸United States Dan_Rogers Driggs, ID

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024