mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Restoring cursor position on raw data views
Summary: This diff introduces cursor features for raw data views: - Restoring cursor position when the browser window is reloaded - Restoring the last edit position when the browser window is reloaded Test Plan: Added tests Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3314
This commit is contained in:
@@ -14,6 +14,14 @@ export const SpecialDocPage = StringUnion('code', 'acl', 'data', 'GristDocTour')
|
||||
type SpecialDocPage = typeof SpecialDocPage.type;
|
||||
export type IDocPage = number | SpecialDocPage;
|
||||
|
||||
export type ViewDocPage = number | 'data';
|
||||
/**
|
||||
* ViewDocPage is a page that shows table data (either normal or raw data view).
|
||||
*/
|
||||
export function isViewDocPage(docPage: IDocPage): docPage is ViewDocPage {
|
||||
return typeof docPage === 'number' || docPage === 'data';
|
||||
}
|
||||
|
||||
// What page to show in the user's home area. Defaults to 'workspace' if a workspace is set, and
|
||||
// to 'all' otherwise.
|
||||
export const HomePage = StringUnion('all', 'workspace', 'templates', 'trash');
|
||||
|
||||
Reference in New Issue
Block a user