refs #14350-more-options-are-misplaced-in-collection-view
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Wed, 17 Oct 2018 12:24:51 +0000 (14:24 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Wed, 17 Oct 2018 12:24:51 +0000 (14:24 +0200)
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/components/file-tree/file-tree-item.tsx

index 02dd04b4c84e3a4011fe8a9ac4ef5599a540300c..98164ad4204a8fb5d7cea1c4e25ede59a3a5d6b4 100644 (file)
@@ -10,7 +10,7 @@ import { formatFileSize } from "~/common/formatters";
 import { ListItemTextIcon } from "../list-item-text-icon/list-item-text-icon";
 import { FileTreeData } from "./file-tree-data";
 
-type CssRules = "root" | "spacer" | "sizeInfo" | "button";
+type CssRules = "root" | "spacer" | "sizeInfo" | "button" | "moreOptions";
 
 const fileTreeItemStyle: StyleRulesCallback<CssRules> = theme => ({
     root: {
@@ -27,7 +27,10 @@ const fileTreeItemStyle: StyleRulesCallback<CssRules> = theme => ({
     button: {
         width: theme.spacing.unit * 3,
         height: theme.spacing.unit * 3,
-        marginRight: theme.spacing.unit
+        marginRight: theme.spacing.unit,
+    },
+    moreOptions: {
+        position: 'absolute'
     }
 });
 
@@ -51,7 +54,7 @@ export const FileTreeItem = withStyles(fileTreeItemStyle)(
                     <IconButton
                         className={classes.button}
                         onClick={this.handleClick}>
-                        <MoreOptionsIcon />
+                        <MoreOptionsIcon className={classes.moreOptions}/>
                     </IconButton>
                 </Tooltip>
             </div >;