mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
fix: scope Reset All button visibility to current tab's data
Show the button only when the active tab has data, preventing the empty-list-with-button scenario on the Variables tab when only artifacts exist.
This commit is contained in:
@ -37,7 +37,7 @@ const VariablesPanel: FC<{ onClose: () => void }> = ({ onClose }) => {
|
||||
setCurrentFocusNodeId('')
|
||||
}, [deleteAllInspectorVars, setCurrentFocusNodeId])
|
||||
|
||||
const hasData = !isVariablesEmpty || hasArtifacts
|
||||
const hasData = resolvedTab === InspectTab.Variables ? !isVariablesEmpty : hasArtifacts
|
||||
const headerActions = hasData
|
||||
? (
|
||||
<Button variant="ghost" size="small" onClick={handleClear}>
|
||||
|
||||
Reference in New Issue
Block a user