disable save when there are no changes (#975)

fixes: #679
This commit is contained in:
Erik Jan de Wit 2021-08-10 12:15:23 +02:00 committed by GitHub
parent d15da05d54
commit 9aa1cd0286
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -177,11 +177,7 @@ export const AttributesForm = ({
</Tbody> </Tbody>
</TableComposable> </TableComposable>
<ActionGroup className="kc-attributes__action-group"> <ActionGroup className="kc-attributes__action-group">
<Button <Button variant="primary" type="submit" isDisabled={!watchLast}>
variant="primary"
type="submit"
isDisabled={!formState.isDirty}
>
{t("common:save")} {t("common:save")}
</Button> </Button>
<Button <Button

View file

@ -47,7 +47,9 @@ export const GroupTable = () => {
const loader = async () => { const loader = async () => {
const groupsData = id const groupsData = id
? (await adminClient.groups.findOne({ id })).subGroups ? (await adminClient.groups.findOne({ id })).subGroups
: await adminClient.groups.find(); : await adminClient.groups.find({
briefRepresentation: false,
} as unknown as any);
if (!groupsData) { if (!groupsData) {
history.push(`/${realm}/groups`); history.push(`/${realm}/groups`);