Adding drupal_add_tabledrag() support for parents with depth 0

Created on 15 October 2011, about 13 years ago
Updated 17 April 2024, 7 months ago

When the max depth is set to 2 or more levels, the tree renders all of the values irrespective of the depth, and when a value is clicked, the depth of that value is automatically adjusted to the set max depth. This is perfect.

IE: Two levels allowed, but three are rendered.
a
--b
----c
User clicks c
a
--b
--c

But at the max depth, passing 0 as the depth, the desired / expected behavior when the user clicks a item deeper than the first level, it should fallback to the root level
a
--b
c (was ----c)

But the tree actually allows any level to be rendered, which is the bug.

Using -1 as the depth limiter appears to work nicely

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Javascript 

Last updated 1 day ago

Created by

🇦🇺Australia Alan D.

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024