Collapse all/ Expand all functionality

Created on 12 October 2021, about 3 years ago
Updated 15 August 2024, 4 months ago

Hello,

We use this module on our project, and we would like to have an expand all / collapse all functionality added to the JS.

I refactored and updated the javascript to include collapse all / expand all functionality bound to a button with class ".js--toggle-expand-collapse".

This element also needs a .js--collapse-all or .js--expand-all class, depending if your collapser are default closed or open. (The function toggles between these 2 classes).

Button placement is not included in this feature, we needed a collapse all/expand all button on our menu edit form, so we placed a button on the menu form with these classes through a form_alter hook.

I created a fork based on the dev branch, besides the collapse all / expand all funtionality, this fork also includes:

  • D9 Compatibility
  • Putting all collapsers in a closed state by default.
✨ Feature request
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium jOpdebeeck

Live updates comments and jobs are added and updated live.
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