mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-25 16:42:34 +00:00
use user and client from form when on the events section (#35098)
fixes: #35048 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
@@ -169,10 +169,10 @@ export const UserEvents = ({ user, client }: UserEventsProps) => {
|
||||
|
||||
function loader(first?: number, max?: number) {
|
||||
return adminClient.realms.findEvents({
|
||||
// The admin client wants 'dateFrom' and 'dateTo' to be Date objects, however it cannot actually handle them so we need to cast to any.
|
||||
...(activeFilters as any),
|
||||
client,
|
||||
user,
|
||||
// The admin client wants 'dateFrom' and 'dateTo' to be Date objects, however it cannot actually handle them so we need to cast to any.
|
||||
...(activeFilters as any),
|
||||
realm,
|
||||
first,
|
||||
max,
|
||||
@@ -217,6 +217,14 @@ export const UserEvents = ({ user, client }: UserEventsProps) => {
|
||||
(value) => value !== "" || (Array.isArray(value) && value.length > 0),
|
||||
);
|
||||
|
||||
if (user) {
|
||||
delete newFilters.user;
|
||||
}
|
||||
|
||||
if (client) {
|
||||
delete newFilters.client;
|
||||
}
|
||||
|
||||
setActiveFilters(newFilters);
|
||||
setKey(key + 1);
|
||||
}
|
||||
@@ -393,6 +401,7 @@ export const UserEvents = ({ user, client }: UserEventsProps) => {
|
||||
key={key}
|
||||
categoryName={filterLabels[key]}
|
||||
onClick={() => removeFilter(key)}
|
||||
isClosable
|
||||
>
|
||||
{typeof value === "string" ? (
|
||||
<Chip isReadOnly>{value}</Chip>
|
||||
|
||||
Reference in New Issue
Block a user