17414: Added padding to the last element 17414-Collection-file-listing-shows-only-half-of-the-last-entry
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Tue, 2 Mar 2021 10:54:48 +0000 (11:54 +0100)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Tue, 2 Mar 2021 10:54:48 +0000 (11:54 +0100)
 Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

src/components/tree/virtual-tree.tsx

index 54938969ffded1d38c47cf1172d1fc160a7f1990..52867a836cdab2b971ad00198f45f950af51c659 100644 (file)
@@ -24,12 +24,18 @@ type CssRules = 'list'
     | 'iconOpen'
     | 'toggableIcon'
     | 'checkbox'
+    | 'virtualFileTree'
     | 'virtualizedList';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     list: {
         padding: '3px 0px',
     },
+    virtualFileTree: {
+        "&:last-child": {
+            paddingBottom: 20
+          }
+    },
     virtualizedList: {
         height: '200px',
     },
@@ -84,7 +90,7 @@ export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProp
         const it = itemList[index];
         const level = it.level || 0;
         const { toggleItemActive, disableRipple, currentItemUuid, useRadioButtons } = treeProps;
-        const { listItem, loader, toggableIconContainer, renderContainer } = classes;
+        const { listItem, loader, toggableIconContainer, renderContainer, virtualFileTree } = classes;
         const { levelIndentation = 20, itemRightPadding = 20 } = treeProps;
 
         const showSelection = typeof treeProps.showSelection === 'function'
@@ -130,7 +136,7 @@ export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProp
                 : undefined;
         };
 
-        return <div data-cy='virtual-file-tree' style={style}>
+        return <div className={virtualFileTree} data-cy='virtual-file-tree' style={style}>
             <ListItem button className={listItem}
                 style={{
                     paddingLeft: (level + 1) * levelIndentation,