mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
fix: preventing save button from flickering in SQL Lab (#25106)
This commit is contained in:
@@ -98,6 +98,8 @@ const SaveQuery = ({
|
||||
const [showSaveDatasetModal, setShowSaveDatasetModal] = useState(false);
|
||||
const isSaved = !!query.remoteId;
|
||||
const canExploreDatabase = !!database?.allows_virtual_table_explore;
|
||||
const shouldShowSaveButton =
|
||||
database?.allows_virtual_table_explore !== undefined;
|
||||
|
||||
const overlayMenu = (
|
||||
<Menu>
|
||||
@@ -180,10 +182,12 @@ const SaveQuery = ({
|
||||
|
||||
return (
|
||||
<Styles className="SaveQuery">
|
||||
<SaveDatasetActionButton
|
||||
setShowSave={setShowSave}
|
||||
overlayMenu={canExploreDatabase ? overlayMenu : null}
|
||||
/>
|
||||
{shouldShowSaveButton && (
|
||||
<SaveDatasetActionButton
|
||||
setShowSave={setShowSave}
|
||||
overlayMenu={canExploreDatabase ? overlayMenu : null}
|
||||
/>
|
||||
)}
|
||||
<SaveDatasetModal
|
||||
visible={showSaveDatasetModal}
|
||||
onHide={() => setShowSaveDatasetModal(false)}
|
||||
|
||||
Reference in New Issue
Block a user