mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Showing a raw data section on a popup
Summary: Show raw data will now open a popup with raw section instead of redirecting to raw data page. Adding new anchor link type "a2" that is able to open any section in a popup on a current view. Not related: Fixing highlightMatches function, after merging core PR. Test Plan: Updated tests Reviewers: alexmojaki, georgegevoian Reviewed By: alexmojaki, georgegevoian Subscribers: georgegevoian, alexmojaki Differential Revision: https://phab.getgrist.com/D3592
This commit is contained in:
@@ -307,7 +307,7 @@ BaseView.prototype.getAnchorLinkForSection = function(sectionId) {
|
||||
// Note that this case only happens in combination with the widget linking mentioned.
|
||||
// If the table is empty but the 'new record' row is selected, the `viewData.getRowId` line above works.
|
||||
|| 'new';
|
||||
const colRef = this.viewSection.viewFields().peek()[this.cursor.fieldIndex()].colRef();
|
||||
const colRef = this.viewSection.viewFields().peek()[this.cursor.fieldIndex.peek()].colRef.peek();
|
||||
return {hash: {sectionId, rowId, colRef}};
|
||||
}
|
||||
|
||||
@@ -328,7 +328,8 @@ BaseView.prototype.copyLink = async function() {
|
||||
BaseView.prototype.showRawData = async function() {
|
||||
const sectionId = this.schemaModel.rawViewSectionRef.peek();
|
||||
const anchorUrlState = this.getAnchorLinkForSection(sectionId);
|
||||
await urlState().pushUrl({...anchorUrlState, docPage: 'data'});
|
||||
anchorUrlState.hash.popup = true;
|
||||
await urlState().pushUrl(anchorUrlState, {replace: true, avoidReload: true});
|
||||
}
|
||||
|
||||
BaseView.prototype.filterByThisCellValue = function() {
|
||||
|
||||
Reference in New Issue
Block a user