Here I have this checkbox which appears inside of the "Rate" field, when the Bid is in draft or pending status, this checkbox should appear, when it is not, it should disappear. For some reason I can't figure out how to structure this conditional logic and its only taking in the second argument so when the item is in "Draft" status, the checkbox is not showing up. What am I doing wrong here:
<HrCurrencyInput
name='Rate'
label='Rate'
width={width.medium}
onChange={handleChange}
value={formik.values.OverrideRate ? formik.values.Rate : selectedBillable?.Cost ?? ''}
errors={formik.errors.Rate}
InputProps={{
endAdornment:
(
status === "Draft" || status === "Pending" &&
(
<InputAdornment position="end">
<HrCheckBox
name="OverrideRate"
checked={formik.values.OverrideRate}
onChange={handleOverrideChange}
sx={{
m: "0 -8px 0 0",
"& .MuiCheckbox-root": {
p: 0
}
}}
/>
</InputAdornment>
)
)
}}
InputLabelProps={{ shrink: true }}
disabled={!formik.values.OverrideRate}
/>

