From 15de60446b1b408d6754d020f96523d6bf2362a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ervin=20R=C3=A1cz?= Date: Tue, 10 Dec 2024 18:51:02 +0200 Subject: [PATCH] frontend: component api fixes after new dep resolution, MUI got a minor version bumb --- .../src/components/Activity/ActivityContainer.tsx | 4 ++-- frontend/src/components/Instances/List.tsx | 4 ++-- frontend/src/components/Packages/List.tsx | 2 +- .../common/AutoCompletePicker/AutoCompletePicker.tsx | 12 ++++++------ .../components/common/SimpleTable/SimpleTable.tsx | 4 ++-- .../common/TimezonePicker/TimezonePicker.tsx | 12 ++++++------ 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/Activity/ActivityContainer.tsx b/frontend/src/components/Activity/ActivityContainer.tsx index 5fc838e29..ba6a60560 100644 --- a/frontend/src/components/Activity/ActivityContainer.tsx +++ b/frontend/src/components/Activity/ActivityContainer.tsx @@ -142,8 +142,8 @@ function Container() { nextIconButtonProps={{ 'aria-label': t('activity|next page'), }} - onChangePage={handleChangePage} - onChangeRowsPerPage={handleChangeRowsPerPage} + onPageChange={handleChangePage} + onRowsPerPageChange={handleChangeRowsPerPage} /> diff --git a/frontend/src/components/Instances/List.tsx b/frontend/src/components/Instances/List.tsx index ac9c5777b..24050f5c9 100644 --- a/frontend/src/components/Instances/List.tsx +++ b/frontend/src/components/Instances/List.tsx @@ -507,8 +507,8 @@ function ListView(props: { application: Application; group: Group }) { nextIconButtonProps={{ 'aria-label': t('frequent|next page'), }} - onChangePage={handleChangePage} - onChangeRowsPerPage={handleChangeRowsPerPage} + onPageChange={handleChangePage} + onRowsPerPageChange={handleChangeRowsPerPage} /> ) : ( diff --git a/frontend/src/components/Packages/List.tsx b/frontend/src/components/Packages/List.tsx index c8bf9a910..98c9958c8 100644 --- a/frontend/src/components/Packages/List.tsx +++ b/frontend/src/components/Packages/List.tsx @@ -134,7 +134,7 @@ function List(props: { appID: string }) { nextIconButtonProps={{ 'aria-label': t('frequent|next page'), }} - onChangePage={handleChangePage} + onPageChange={handleChangePage} /> ) diff --git a/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx b/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx index f8eec38ec..0bebb431d 100644 --- a/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx +++ b/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx @@ -6,11 +6,11 @@ import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; import FormControl from '@material-ui/core/FormControl'; import Input from '@material-ui/core/Input'; -import InputLabel from '@material-ui/core/InputLabel'; +import InputLabel, { InputLabelProps } from '@material-ui/core/InputLabel'; import ListItem from '@material-ui/core/ListItem'; import { makeStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; -import Downshift, { GetLabelPropsOptions } from 'downshift'; +import Downshift from 'downshift'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { FixedSizeList, ListOnItemsRenderedProps } from 'react-window'; @@ -25,11 +25,11 @@ interface RenderInputProps { autoFocus: boolean; label: string; placeholder: string; - InputLabelProps: (options?: GetLabelPropsOptions | undefined) => void; + InputLabelProps: InputLabelProps; InputProps: { - onBlur: () => void; - onChange: React.ChangeEventHandler; - onFocus: () => void; + onBlur?: React.FocusEventHandler; + onChange?: React.ChangeEventHandler; + onFocus?: React.FocusEventHandler; }; inputProps: object; variant: 'outlined'; diff --git a/frontend/src/components/common/SimpleTable/SimpleTable.tsx b/frontend/src/components/common/SimpleTable/SimpleTable.tsx index a3be8c818..dcfa121e8 100644 --- a/frontend/src/components/common/SimpleTable/SimpleTable.tsx +++ b/frontend/src/components/common/SimpleTable/SimpleTable.tsx @@ -87,8 +87,8 @@ export default function SimpleTable(props: SimpleTableProps) { nextIconButtonProps={{ 'aria-label': t('frequent|next page'), }} - onChangePage={handleChangePage} - onChangeRowsPerPage={handleChangeRowsPerPage} + onPageChange={handleChangePage} + onRowsPerPageChange={handleChangeRowsPerPage} /> )} diff --git a/frontend/src/components/common/TimezonePicker/TimezonePicker.tsx b/frontend/src/components/common/TimezonePicker/TimezonePicker.tsx index d5157c006..2a182c961 100644 --- a/frontend/src/components/common/TimezonePicker/TimezonePicker.tsx +++ b/frontend/src/components/common/TimezonePicker/TimezonePicker.tsx @@ -5,12 +5,12 @@ import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; import FormControl from '@material-ui/core/FormControl'; import Input from '@material-ui/core/Input'; -import InputLabel from '@material-ui/core/InputLabel'; +import InputLabel, { InputLabelProps } from '@material-ui/core/InputLabel'; import ListItem from '@material-ui/core/ListItem'; import ListItemText from '@material-ui/core/ListItemText'; import { makeStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; -import Downshift, { GetLabelPropsOptions } from 'downshift'; +import Downshift from 'downshift'; import moment from 'moment-timezone'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -30,15 +30,15 @@ interface RenderInputProps { }; ref?: React.Ref; InputProps: { - onBlur: () => void; - onChange: () => void; - onFocus: () => void; + onBlur?: React.FocusEventHandler; + onChange?: React.FormEventHandler; + onFocus?: React.FocusEventHandler; }; fullWidth: boolean; autoFocus: boolean; label: string; placeholder: string; - InputLabelProps: (options?: GetLabelPropsOptions | undefined) => void; + InputLabelProps: InputLabelProps; variant: 'outlined'; inputProps: object; }