mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
grafana/ui: Add default type="button" to <Button> (#48183)
This commit is contained in:
@@ -41,7 +41,9 @@ const onClose = () => locationService.partial({ editview: null });
|
||||
const MakeEditable = (props: { onMakeEditable: () => any }) => (
|
||||
<div>
|
||||
<div className="dashboard-settings__header">Dashboard not editable</div>
|
||||
<Button onClick={props.onMakeEditable}>Make editable</Button>
|
||||
<Button type="submit" onClick={props.onMakeEditable}>
|
||||
Make editable
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ export const JsonEditorSettings: React.FC<Props> = ({ dashboard }) => {
|
||||
</div>
|
||||
{dashboard.meta.canSave && (
|
||||
<HorizontalGroup>
|
||||
<Button onClick={onClick}>Save changes</Button>
|
||||
<Button type="submit" onClick={onClick}>
|
||||
Save changes
|
||||
</Button>
|
||||
</HorizontalGroup>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,9 @@ export const SaveProvisionedDashboardForm: React.FC<SaveDashboardFormProps> = ({
|
||||
<ClipboardButton getText={() => dashboardJSON} onClipboardCopy={onCopyToClipboardSuccess}>
|
||||
Copy JSON to clipboard
|
||||
</ClipboardButton>
|
||||
<Button onClick={saveToFile}>Save JSON to file</Button>
|
||||
<Button type="submit" onClick={saveToFile}>
|
||||
Save JSON to file
|
||||
</Button>
|
||||
</HorizontalGroup>
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user