mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Allow docs to be permanently deleted in icon view
Summary: Previously, soft-deleted docs in icon view were still accessible from the Trash and couldn't be permanently deleted. Test Plan: Improved the nbrowser test for deleting docs to verify that it can be done in both view modes. Reviewers: dsagal, paulfitz Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2862
This commit is contained in:
@@ -103,15 +103,15 @@ function _buildExampleListDocs(home: HomeModel, workspace: Workspace, viewSettin
|
||||
testId('examples-desc'),
|
||||
),
|
||||
dom.domComputed(viewSettings.currentView, (view) =>
|
||||
dom.forEach(workspace.docs, doc => buildExampleItem(doc, home, view))
|
||||
dom.forEach(workspace.docs, doc => buildExampleItem(doc, home, workspace, view))
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
function buildExampleItem(doc: Document, home: HomeModel, view: 'list'|'icons') {
|
||||
function buildExampleItem(doc: Document, home: HomeModel, workspace: Workspace, view: 'list'|'icons') {
|
||||
const ex = examples.find((e) => e.matcher.test(doc.name));
|
||||
if (view === 'icons') {
|
||||
return buildPinnedDoc(home, doc, ex);
|
||||
return buildPinnedDoc(home, doc, workspace, ex);
|
||||
} else {
|
||||
return css.docRowWrapper(
|
||||
cssDocRowLink(
|
||||
|
||||
Reference in New Issue
Block a user