mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) show differences in card views when comparing documents
Summary: This makes a small tweak to show cell and row changes in card views and card list views, and adds a test for it. Test Plan: added tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2660
This commit is contained in:
parent
c67966775b
commit
5a9fe0ea27
@ -370,6 +370,10 @@ DetailView.prototype.makeRecord = function(record) {
|
|||||||
return dom(
|
return dom(
|
||||||
this.recordLayout.buildLayoutDom(record),
|
this.recordLayout.buildLayoutDom(record),
|
||||||
kd.cssClass(() => 'detail_theme_record_' + this.viewSection.themeDef()),
|
kd.cssClass(() => 'detail_theme_record_' + this.viewSection.themeDef()),
|
||||||
|
this.comparison ? kd.cssClass(() => {
|
||||||
|
const rowType = this.extraRows.getRowType(record.id());
|
||||||
|
return rowType && `diff-${rowType}` || '';
|
||||||
|
}) : null,
|
||||||
kd.toggleClass('active', () => (this.cursor.rowIndex() === record._index() && this.viewSection.hasFocus())),
|
kd.toggleClass('active', () => (this.cursor.rowIndex() === record._index() && this.viewSection.hasFocus())),
|
||||||
// 'detailview_record_single' or 'detailview_record_detail' doesn't need to be an observable,
|
// '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.
|
// since a change to parentKey would cause a separate call to makeRecord.
|
||||||
|
@ -111,7 +111,7 @@ export class DataTableModelWithDiff extends DisposableWithEvents implements Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
public createFloatingRowModel(optRowModelClass: any): BaseRowModel {
|
public createFloatingRowModel(optRowModelClass: any): BaseRowModel {
|
||||||
return this.core.createFloatingRowModel(optRowModelClass);
|
return this._wrappedModel.createFloatingRowModel(optRowModelClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
public fetch(force?: boolean): Promise<void> {
|
public fetch(force?: boolean): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user