Skip to content

Add responsiveLayout "collapseEditable" so folded cells stay editable - #4954

Open
EmpiDev wants to merge 1 commit into
tabulator-tables:masterfrom
EmpiDev:responsive-collapse-editors
Open

Add responsiveLayout "collapseEditable" so folded cells stay editable#4954
EmpiDev wants to merge 1 commit into
tabulator-tables:masterfrom
EmpiDev:responsive-collapse-editors

Conversation

@EmpiDev

@EmpiDev EmpiDev commented Sep 4, 2026

Copy link
Copy Markdown

Closes #3749. Follows the direction from the #3875 review.

responsiveLayout: "collapse" builds its block from a mock cell component whose
getElement() returns a throwaway div. The editor, validators and cell events are
all bound to the real cell element at cell-init, so none of them reach that copy
and a folded field is read only.

This adds a sibling mode, "collapseEditable", that relocates the real cells into
the row's existing .tabulator-responsive-collapse container instead:

  • showColumn puts a relocated cell back in the row, at its column's position,
    before the column is made visible again.
  • generateCollapsedRowContent restores before it tears down, so a rebuild moves
    cells rather than orphaning them; one landing mid-edit is deferred and replayed
    on edit-editor-clear.
  • The toggle formatter dispatches row-responsive-toggled, so an editor left in a
    collapsing container gets closed.

The row stays display: block, and the labels stay real elements, in place during
the edit. No changes to Edit, Validate, Cell, Row or any renderer: the
validation chain, cell.setValue and cellEdited work because it is the same
cell. "collapse" is untouched.

28 jest specs and 11 playwright specs for what jsdom cannot measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editable collapsed data

1 participant