mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Chore: Remove Form usage from AddPermission (#81261)
This commit is contained in:
parent
27839fec11
commit
ab467a41c2
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { Button, Form, Select, Stack } from '@grafana/ui';
|
||||
import { Button, Select, Stack } from '@grafana/ui';
|
||||
import { CloseButton } from 'app/core/components/CloseButton/CloseButton';
|
||||
import { ServiceAccountPicker } from 'app/core/components/Select/ServiceAccountPicker';
|
||||
import { TeamPicker } from 'app/core/components/Select/TeamPicker';
|
||||
@ -71,12 +71,7 @@ export const AddPermission = ({
|
||||
<CloseButton onClick={onCancel} />
|
||||
<h5>{title}</h5>
|
||||
|
||||
<Form
|
||||
name="addPermission"
|
||||
maxWidth="none"
|
||||
onSubmit={() => onAdd({ userId, teamId, builtInRole, permission, target })}
|
||||
>
|
||||
{() => (
|
||||
<form name="addPermission" onSubmit={() => onAdd({ userId, teamId, builtInRole, permission, target })}>
|
||||
<Stack gap={1} direction="row">
|
||||
<Select
|
||||
aria-label="Role to add new permission to"
|
||||
@ -117,8 +112,7 @@ export const AddPermission = ({
|
||||
<Trans i18nKey="access-control.add-permissions.save">Save</Trans>
|
||||
</Button>
|
||||
</Stack>
|
||||
)}
|
||||
</Form>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user