mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Open links with different link keys in a new tab
Summary: Check urlState.params.linkParameters in needPageLoad Test Plan: Added case to nbrowser test, tested manually Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2984
This commit is contained in:
parent
54b932300b
commit
97cb8065d9
@ -27,6 +27,7 @@ import {UrlState} from 'app/client/lib/UrlState';
|
||||
import {decodeUrl, encodeUrl, getSlugIfNeeded, GristLoadConfig, IGristUrlState, useNewUI} from 'app/common/gristUrls';
|
||||
import {Document} from 'app/common/UserAPI';
|
||||
import isEmpty = require('lodash/isEmpty');
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import {CellValue} from "app/plugin/GristData";
|
||||
|
||||
/**
|
||||
@ -166,7 +167,10 @@ export class UrlStateImpl {
|
||||
const newuiReload = useNewUI(prevState.newui) !== useNewUI(newState.newui);
|
||||
// Reload when moving to/from a welcome page.
|
||||
const welcomeReload = Boolean(prevState.welcome) !== Boolean(newState.welcome);
|
||||
return Boolean(orgReload || billingReload || gristConfig.errPage || docReload || newuiReload || welcomeReload);
|
||||
// Reload when link keys change, which changes what the user can access
|
||||
const linkKeysReload = !isEqual(prevState.params?.linkParameters, newState.params?.linkParameters);
|
||||
return Boolean(orgReload || billingReload || gristConfig.errPage
|
||||
|| docReload || newuiReload || welcomeReload || linkKeysReload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user