(core) Fix Card view linked to summary to show card navigation buttons

Test Plan: Added a test case to verify that nav buttons are now shown and work.

Reviewers: alexmojaki

Reviewed By: alexmojaki

Differential Revision: https://phab.getgrist.com/D3073
This commit is contained in:
Dmitry S 2021-10-14 00:06:02 -04:00
parent 67ec52365a
commit c8da5c7356

View File

@ -318,11 +318,11 @@ DetailView.prototype.buildTitleControls = function() {
// Hide controls if this is a card list section, or if the section has a scroll cursor link, since // Hide controls if this is a card list section, or if the section has a scroll cursor link, since
// the controls can be confusing in this case. // the controls can be confusing in this case.
// Note that the controls should still be visible with a filter link. // Note that the controls should still be visible with a filter link.
const showControls = ko.computed(() => const showControls = ko.computed(() => {
this._isSingle && if (!this._isSingle || this.recordLayout.layoutEditor()) { return false; }
(!this.viewSection.activeLinkSrcSectionRef() || this.viewSection.activeLinkTargetColRef()) && const linkingState = this._linkingState();
!this.recordLayout.layoutEditor() return !(linkingState && Boolean(linkingState.cursorPos));
); });
return dom('div', return dom('div',
dom.autoDispose(showControls), dom.autoDispose(showControls),