aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-07-30 14:00:12 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-07-30 14:00:12 -0400
commitfb4b4658f39c2a845174372a8fd814c49bf26d7c (patch)
tree2268448b391b5599730618baa229bcca006f31d5 /src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
parent107c389f61df36b464ae3ec73e2f553a78f3e64a (diff)
template preview columns update with resizing
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
index e5288f4f8..34bec3b88 100644
--- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
+++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx
@@ -296,7 +296,8 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> {
get templatesPreviewContents(){
const renderedTemplates: Doc[] = [];
return (
- <div className='docCreatorMenu-preview-container'>
+ <div className='docCreatorMenu-preview-container'
+ style={{gridTemplateColumns: `repeat(${Math.floor((this._menuDimensions.width - 10) / 140)}, 140px)`}}>
{this._templateDocs.map(doc => ({icon: ImageCast(doc.icon), doc})).filter(info => info.icon && info.doc).map(info => {
if (renderedTemplates.includes(info.doc)) return undefined;
renderedTemplates.push(info.doc);