Merge pull request #1789 from automatisch/fix-use-apps
fix: introduce fix for useApps not using name as param
This commit is contained in:
@@ -6,7 +6,9 @@ export default function useApps(variables) {
|
||||
const trueOnlyVariables =
|
||||
variables &&
|
||||
Object.fromEntries(
|
||||
Object.entries(variables).filter(([_, value]) => value === true),
|
||||
Object.entries(variables).filter(
|
||||
([key, value]) => value === true || key === 'name',
|
||||
),
|
||||
);
|
||||
|
||||
const query = useQuery({
|
||||
|
@@ -13,9 +13,11 @@ import useApps from 'hooks/useApps';
|
||||
|
||||
function AdminApplications() {
|
||||
const formatMessage = useFormatMessage();
|
||||
const [appName, setAppName] = React.useState(null);
|
||||
const [appName, setAppName] = React.useState('');
|
||||
|
||||
const { data: apps, isLoading: isAppsLoading } = useApps(appName);
|
||||
const { data: apps, isLoading: isAppsLoading } = useApps({
|
||||
name: appName,
|
||||
});
|
||||
|
||||
const onSearchChange = React.useCallback((event) => {
|
||||
setAppName(event.target.value);
|
||||
|
Reference in New Issue
Block a user