(core) Inactive card list widget now have idicator that show cursor position of linked widget

Test Plan: nbrowser test added

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D4009
This commit is contained in:
Jakub Serafin
2023-08-24 13:04:15 +02:00
parent d5a4605d2a
commit 2073e6224e
3 changed files with 37 additions and 2 deletions

View File

@@ -430,6 +430,7 @@ DetailView.prototype.makeRecord = function(record) {
return rowType && `diff-${rowType}` || '';
}) : null,
kd.toggleClass('active', () => (this.cursor.rowIndex() === record._index() && this.viewSection.hasFocus())),
kd.toggleClass('selected', () => (this.cursor.rowIndex() === record._index() && !this.viewSection.hasFocus())),
// 'detailview_record_single' or 'detailview_record_detail' doesn't need to be an observable,
// since a change to parentKey would cause a separate call to makeRecord.
kd.cssClass('detailview_record_' + this.viewSection.parentKey.peek())