mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-19 01:15:04 -05:00
Update MUI from v6 to v7.
This commit is contained in:
@@ -12,7 +12,7 @@ import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState }
|
||||
import { styled } from '@mui/material/styles';
|
||||
import {
|
||||
Box, FormControl, OutlinedInput, FormHelperText, ToggleButton, ToggleButtonGroup,
|
||||
Grid2 as Grid, IconButton, FormControlLabel, Switch, Checkbox, useTheme, InputLabel, Paper, Select as MuiSelect, Radio, Tooltip,
|
||||
Grid, IconButton, FormControlLabel, Switch, Checkbox, useTheme, InputLabel, Paper, Select as MuiSelect, Radio, Tooltip,
|
||||
} from '@mui/material';
|
||||
import ErrorRoundedIcon from '@mui/icons-material/ErrorOutlineRounded';
|
||||
import InfoRoundedIcon from '@mui/icons-material/InfoRounded';
|
||||
@@ -257,7 +257,7 @@ const DATE_TIME_FORMAT = {
|
||||
TIME_24: 'HH:mm:ss',
|
||||
};
|
||||
|
||||
export function InputDateTimePicker({ value, onChange, readonly, controlProps, ...props }) {
|
||||
export function InputDateTimePicker({ value, onChange, readonly, controlProps, error, ...props }) {
|
||||
let format = '';
|
||||
let placeholder = '';
|
||||
let regExp = /[a-zA-Z]/;
|
||||
@@ -308,7 +308,7 @@ export function InputDateTimePicker({ value, onChange, readonly, controlProps, .
|
||||
ampm: controlProps.ampm ? controlProps.ampm : undefined,
|
||||
disablePast: controlProps.disablePast || false,
|
||||
onChange: handleChange,
|
||||
slotProps: {textField: {placeholder:placeholder}}
|
||||
slotProps: {textField: {placeholder:placeholder, error: error}}
|
||||
};
|
||||
|
||||
if (controlProps?.pickerType === 'Date') {
|
||||
@@ -330,12 +330,13 @@ InputDateTimePicker.propTypes = {
|
||||
onChange: PropTypes.func,
|
||||
readonly: PropTypes.bool,
|
||||
controlProps: PropTypes.object,
|
||||
error: PropTypes.bool,
|
||||
};
|
||||
|
||||
export function FormInputDateTimePicker({ hasError, required, label, className, helpMessage, testcid, labelTooltip, ...props }) {
|
||||
return (
|
||||
<FormInput required={required} label={label} error={hasError} className={className} helpMessage={helpMessage} testcid={testcid} labelTooltip={labelTooltip}>
|
||||
<InputDateTimePicker {...props} />
|
||||
<InputDateTimePicker error={hasError} {...props} />
|
||||
</FormInput>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import React, { useMemo, useRef } from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import { Box } from '@mui/material';
|
||||
import { styled } from '@mui/material/styles';
|
||||
import {
|
||||
useReactTable,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import gettext from 'sources/gettext';
|
||||
import _ from 'lodash';
|
||||
import { FormGroup, Grid2 as Grid, Typography } from '@mui/material';
|
||||
import { FormGroup, Grid, Typography } from '@mui/material';
|
||||
import React from 'react';
|
||||
import { InputText } from './FormComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import gettext from 'sources/gettext';
|
||||
import { Grid2 as Grid, FormHelperText } from '@mui/material';
|
||||
import { Grid, FormHelperText } from '@mui/material';
|
||||
import React, { useMemo } from 'react';
|
||||
import {InputSelect } from './FormComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
Reference in New Issue
Block a user