themes ux review (#646)

This commit is contained in:
Jenny 2021-06-01 08:14:56 -04:00 committed by GitHub
parent 1e2de8d570
commit 347a2db8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,9 +272,9 @@ export const RealmSettingsThemesTab = ({
render={({ value, onChange }) => ( render={({ value, onChange }) => (
<Select <Select
toggleId="kc-supported-locales" toggleId="kc-supported-locales"
onToggle={() => onToggle={() => {
setSupportedLocalesOpen(!supportedLocalesOpen) setSupportedLocalesOpen(!supportedLocalesOpen);
} }}
onSelect={(_, v) => { onSelect={(_, v) => {
const option = v as string; const option = v as string;
if (!value) { if (!value) {
@ -283,10 +283,8 @@ export const RealmSettingsThemesTab = ({
onChange( onChange(
value.filter((item: string) => item !== option) value.filter((item: string) => item !== option)
); );
setSupportedLocalesOpen(false);
} else { } else {
onChange([...value, option]); onChange([...value, option]);
setSupportedLocalesOpen(false);
} }
}} }}
onClear={() => { onClear={() => {