msyavuz commented on code in PR #35601:
URL: https://github.com/apache/superset/pull/35601#discussion_r2466544739


##########
superset-frontend/src/SqlLab/components/TablePreview/index.tsx:
##########
@@ -240,16 +226,40 @@ const TablePreview: FC<Props> = ({ dbId, catalog, schema, 
tableName }) => {
     ],
   );
 
-  const dropdownMenu = useMemo(() => {
-    let menus = [...MENUS];
-    if (!tableData.selectStar) {
-      menus = menus.filter(({ key }) => key !== 'copy-select-statement');
-    }
-    if (!tableData.view) {
-      menus = menus.filter(({ key }) => key !== 'show-create-view-statement');
-    }
-    return menus;
-  }, [tableData.view, tableData.selectStar]);
+  const titleActions = () => (
+    <Flex
+      align="center"
+      css={css`
+        padding-left: ${theme.sizeUnit * 2}px;
+      `}
+    >
+      <ActionButton
+        label="Refresh table schema"
+        tooltip={t('Refresh table schema')}
+        icon="SyncOutlined"
+        iconSize="m"
+        onClick={refreshTableMetadata}
+      />
+      {tableData.selectStar && (
+        <ActionButton
+          label="Copy SELECT statement"
+          icon="CopyOutlined"

Review Comment:
   I think i did that because the original implementation of ActionBar had the 
icons as strings. Agreed on passing components instead



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to