Adding props to the price widget

This commit is contained in:
2025-01-26 15:33:32 +01:00
parent 716ba233f5
commit 7ad85dfb34

View File

@@ -8,6 +8,7 @@ export const BgfcPriceWidget = (props: WidgetProps) => {
return ( return (
<NumericFormat <NumericFormat
{...props}
customInput={TextField} customInput={TextField}
getInputRef={inputRef} getInputRef={inputRef}
onValueChange={values => { onValueChange={values => {
@@ -19,15 +20,15 @@ export const BgfcPriceWidget = (props: WidgetProps) => {
}); });
}} }}
slotProps={{ slotProps={{
input: { input: {
startAdornment: <InputAdornment position="end">$</InputAdornment>, //startAdornment: <InputAdornment position="end">$</InputAdornment>,
endAdornment: <InputAdornment position="start"></InputAdornment> endAdornment: <InputAdornment position="start"></InputAdornment>
}, },
}} }}
valueIsNumericString={true} valueIsNumericString={true}
fixedDecimalScale={true} fixedDecimalScale={true}
decimalScale={2} decimalScale={2}
defaultValue={0} //defaultValue={0}
/> />
); );
} }