Add responsiveLayout "collapseEditable" so folded cells stay editable - #4954
Open
EmpiDev wants to merge 1 commit into
Open
Add responsiveLayout "collapseEditable" so folded cells stay editable#4954EmpiDev wants to merge 1 commit into
EmpiDev wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3749. Follows the direction from the #3875 review.
responsiveLayout: "collapse"builds its block from a mock cell component whosegetElement()returns a throwaway div. The editor, validators and cell events areall bound to the real cell element at
cell-init, so none of them reach that copyand a folded field is read only.
This adds a sibling mode,
"collapseEditable", that relocates the real cells intothe row's existing
.tabulator-responsive-collapsecontainer instead:showColumnputs a relocated cell back in the row, at its column's position,before the column is made visible again.
generateCollapsedRowContentrestores before it tears down, so a rebuild movescells rather than orphaning them; one landing mid-edit is deferred and replayed
on
edit-editor-clear.row-responsive-toggled, so an editor left in acollapsing container gets closed.
The row stays
display: block, and the labels stay real elements, in place duringthe edit. No changes to
Edit,Validate,Cell,Rowor any renderer: thevalidation chain,
cell.setValueandcellEditedwork because it is the samecell.
"collapse"is untouched.28 jest specs and 11 playwright specs for what jsdom cannot measure.