Skip to content

Commit

Permalink
Update deprecated MUI inputProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonexe committed Sep 5, 2024
1 parent 18ef0ce commit 93e78e2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
8 changes: 6 additions & 2 deletions appUI/src/actions/VaporAnalysis/VaporAnalysisDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export const VaporAnalysisDialog: FC<VaporAnalysisDialogProps> = ({ data, open,
onChange={handleChange_T}
size="small"
className="num-input"
InputProps={{ endAdornment: <InputAdornment position="end">{UoM_T}</InputAdornment> }}
slotProps={{
input: { endAdornment: <InputAdornment position="end">{UoM_T}</InputAdornment> },
}}
/>
</form>
<form onSubmit={handleQuery_p}>
Expand All @@ -97,7 +99,9 @@ export const VaporAnalysisDialog: FC<VaporAnalysisDialogProps> = ({ data, open,
onChange={handleChange_p}
size="small"
className="num-input"
InputProps={{ endAdornment: <InputAdornment position="end">{UoM_p}</InputAdornment> }}
slotProps={{
input: { endAdornment: <InputAdornment position="end">{UoM_p}</InputAdornment> },
}}
/>
</form>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion appUI/src/components/SpreadsheetControls/AddRowsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const AddRowsButton: FC<AddRowsButtonProps> = ({ setData }) => {
autoFocus
size="small"
style={{ maxWidth: 60, padding: 0 }}
inputProps={{ style: { padding: 6.75 }, min: 0 }}
slotProps={{ htmlInput: { style: { padding: 6.75 }, min: 0 } }}
/>
<Button type="submit" variant="text" style={{ paddingLeft: 0, paddingRight: 0 }}>
Add
Expand Down
4 changes: 2 additions & 2 deletions appUI/src/pages/Compounds/UpsertCompoundDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const UpsertCompoundDialog: FC<UpsertCompoundDialogProps> = ({ origCompou
onChange={(e) => setT_min(Number(e.target.value))}
size="small"
className="num-input"
inputProps={{ min: 0 }}
slotProps={{ htmlInput: { min: 0 } }}
/>
<TextField
type="number"
Expand All @@ -184,7 +184,7 @@ export const UpsertCompoundDialog: FC<UpsertCompoundDialogProps> = ({ origCompou
onChange={(e) => setT_max(Number(e.target.value))}
size="small"
className="num-input"
inputProps={{ min: 0 }}
slotProps={{ htmlInput: { min: 0 } }}
/>
{tempError && <ErrorLabel title="Invalid values." />}
</Stack>
Expand Down
4 changes: 3 additions & 1 deletion appUI/src/pages/Fitting/buttons/TabulateModelButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const TabulateModelButton: FC<TabulateModelButtonProps> = ({ compound1, c
onChange={(e) => setRaw_p(e.target.value)}
size="small"
className="num-input"
InputProps={{ endAdornment: <InputAdornment position="end">{UoM_p}</InputAdornment> }}
slotProps={{
input: { endAdornment: <InputAdornment position="end">{UoM_p}</InputAdornment> },
}}
/>
<Button type="submit" variant="outlined" disabled={isInvalid_p}>
Run
Expand Down
2 changes: 1 addition & 1 deletion appUI/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getCreateTFProps: GeneratorFn<CreateTFPropsFn> = (formConfig, patchConfig,
value: formConfig[key],
onChange: (e: ChE) => patchConfig(key, e.target.value),
onBlur: send,
InputProps: isPercent ? { endAdornment: <span>%</span> } : undefined,
slotProps: isPercent ? { input: { endAdornment: <span>%</span> } } : undefined,
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const FredenslundTestButton: FC<DatasetIdentifier> = (props) => {
label="Legendre polynomial order"
value={legendre_order}
onChange={(e) => setLegendre_order(parseInt(e.target.value))}
inputProps={{ min: 3, max: 5 }}
slotProps={{ htmlInput: { min: 3, max: 5 } }}
size="small"
autoFocus
fullWidth
Expand Down
2 changes: 0 additions & 2 deletions dev/notes_VLizard.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
SciPy orthogonal distant regression

fix deprecated inputProps

0 comments on commit 93e78e2

Please sign in to comment.