mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) When active section changes, tell it to resize its content (which it can't do while hidden)
Test Plan: Tested manually on iPhone and android simulator. On Desktop mode, resize isn't needed, but seems harmless (I can't see any artifacts caused by it). Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2728
This commit is contained in:
parent
8156f957b3
commit
d3ab07d748
@ -123,7 +123,8 @@ export class ViewLayout extends DisposableWithEvents implements IDomComponent {
|
|||||||
|
|
||||||
const classActive = cssLayoutBox.className + '-active';
|
const classActive = cssLayoutBox.className + '-active';
|
||||||
const classInactive = cssLayoutBox.className + '-inactive';
|
const classInactive = cssLayoutBox.className + '-inactive';
|
||||||
this.autoDispose(subscribe(fromKo(this.viewModel.activeSectionId), (use, id) => {
|
this.autoDispose(subscribe(fromKo(this.viewModel.activeSection), (use, section) => {
|
||||||
|
const id = section.getRowId();
|
||||||
this._layout.forEachBox((box: {dom: Element}) => {
|
this._layout.forEachBox((box: {dom: Element}) => {
|
||||||
box.dom.classList.add(classInactive);
|
box.dom.classList.add(classInactive);
|
||||||
box.dom.classList.remove(classActive);
|
box.dom.classList.remove(classActive);
|
||||||
@ -134,6 +135,7 @@ export class ViewLayout extends DisposableWithEvents implements IDomComponent {
|
|||||||
elem.classList.add(classActive);
|
elem.classList.add(classActive);
|
||||||
elem = elem.parentElement;
|
elem = elem.parentElement;
|
||||||
}
|
}
|
||||||
|
section.viewInstance.peek()?.onResize();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const commandGroup = {
|
const commandGroup = {
|
||||||
|
Loading…
Reference in New Issue
Block a user