u
This commit is contained in:
@@ -76,10 +76,26 @@ export default class TextInput extends Component {
|
||||
? (propReadOnly ?? slotProps?.htmlInput?.readOnly ?? inputProps?.readOnly ?? false)
|
||||
: (propReadOnly ?? slotProps?.htmlInput?.readOnly ?? inputProps?.readOnly ?? this.state.readOnly);
|
||||
|
||||
const { inputProps: nestedFromInputProps, ...cleanInputProps } = InputProps || {};
|
||||
const { inputProps: nestedFromSlotInput, ...cleanSlotInput } = slotProps?.input || {};
|
||||
|
||||
const rawResolvedInputProps = (InputProps || slotProps?.input) ? {
|
||||
...cleanSlotInput,
|
||||
...cleanInputProps,
|
||||
startAdornment: (slotProps?.input?.startAdornment && InputProps?.startAdornment)
|
||||
? <>{slotProps.input.startAdornment}{InputProps.startAdornment}</>
|
||||
: (InputProps?.startAdornment ?? slotProps?.input?.startAdornment),
|
||||
endAdornment: (slotProps?.input?.endAdornment && InputProps?.endAdornment)
|
||||
? <>{InputProps.endAdornment}{slotProps.input.endAdornment}</>
|
||||
: (InputProps?.endAdornment ?? slotProps?.input?.endAdornment),
|
||||
} : undefined;
|
||||
|
||||
const htmlInput = isSelect
|
||||
? {
|
||||
readOnly: effectiveReadOnly,
|
||||
...slotProps?.htmlInput,
|
||||
...nestedFromSlotInput,
|
||||
...nestedFromInputProps,
|
||||
...inputProps,
|
||||
}
|
||||
: {
|
||||
@@ -94,20 +110,12 @@ export default class TextInput extends Component {
|
||||
'data-form-type': 'other',
|
||||
readOnly: effectiveReadOnly,
|
||||
...slotProps?.htmlInput,
|
||||
...nestedFromSlotInput,
|
||||
...nestedFromInputProps,
|
||||
...inputProps,
|
||||
};
|
||||
|
||||
const resolvedInputProps = (InputProps || slotProps?.input) ? {
|
||||
...slotProps?.input,
|
||||
...InputProps,
|
||||
startAdornment: (slotProps?.input?.startAdornment && InputProps?.startAdornment)
|
||||
? <>{slotProps.input.startAdornment}{InputProps.startAdornment}</>
|
||||
: (InputProps?.startAdornment ?? slotProps?.input?.startAdornment),
|
||||
endAdornment: (slotProps?.input?.endAdornment && InputProps?.endAdornment)
|
||||
? <>{InputProps.endAdornment}{slotProps.input.endAdornment}</>
|
||||
: (InputProps?.endAdornment ?? slotProps?.input?.endAdornment),
|
||||
} : undefined;
|
||||
|
||||
const resolvedInputProps = rawResolvedInputProps;
|
||||
const { input: _unusedInput, ...restSlotProps } = (slotProps || {});
|
||||
|
||||
const hasLabelProps = Boolean(label || InputLabelProps || slotProps?.inputLabel);
|
||||
|
||||
@@ -460,12 +460,10 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
onChange={(e) => this.handleAmountChange(line.id, e.target.value)}
|
||||
disabled={isBooking}
|
||||
slotProps={{
|
||||
input: {
|
||||
inputProps: {
|
||||
min: 0,
|
||||
step: 1,
|
||||
style: { textAlign: 'right', padding: '4px 8px' },
|
||||
},
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
step: 1,
|
||||
style: { textAlign: 'right', padding: '4px 8px' },
|
||||
},
|
||||
}}
|
||||
sx={{ width: 90 }}
|
||||
|
||||
@@ -357,7 +357,7 @@ class ManifestHeader extends PureComponent {
|
||||
flex: { xs: '1 1 100%', sm: '2 1 200px' },
|
||||
minWidth: { sm: 160 },
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
renderInput={({ inputProps: _unusedInputProps, InputProps: _unusedInputProps2, InputLabelProps: _unusedInputLabelProps, ...params }) => (
|
||||
<TextField
|
||||
{...params}
|
||||
inputRef={this.partyInputRef}
|
||||
|
||||
Reference in New Issue
Block a user