fix forward percentage width on mobile

This commit is contained in:
keyan 2023-08-28 14:31:28 -05:00
parent a0af954d60
commit e77bc819bb
2 changed files with 8 additions and 6 deletions

View File

@ -66,11 +66,13 @@ export default function AdvPostForm ({ edit }) {
<Input <Input
name={`forward[${index}].pct`} name={`forward[${index}].pct`}
type='number' type='number'
step='1' step={5}
min='1' min={1}
max='100' max={100}
style={{ minWidth: '3.5rem' }}
append={<InputGroup.Text className='text-monospace'>%</InputGroup.Text>} append={<InputGroup.Text className='text-monospace'>%</InputGroup.Text>}
groupClassName='flex-shrink-1 mb-0' groupClassName='mb-0'
inputGroupClassName='flex-nowrap'
/> />
</div> </div>
) )

View File

@ -219,7 +219,7 @@ function FormGroup ({ className, label, children }) {
function InputInner ({ function InputInner ({
prepend, append, hint, showValid, onChange, onBlur, overrideValue, prepend, append, hint, showValid, onChange, onBlur, overrideValue,
innerRef, noForm, clear, onKeyDown, debounce, ...props innerRef, noForm, clear, onKeyDown, inputGroupClassName, debounce, ...props
}) { }) {
const [field, meta, helpers] = noForm ? [{}, {}, {}] : useField(props) const [field, meta, helpers] = noForm ? [{}, {}, {}] : useField(props)
const formik = noForm ? null : useFormikContext() const formik = noForm ? null : useFormikContext()
@ -259,7 +259,7 @@ function InputInner ({
return ( return (
<> <>
<InputGroup hasValidation> <InputGroup hasValidation className={inputGroupClassName}>
{prepend} {prepend}
<BootstrapForm.Control <BootstrapForm.Control
onKeyDown={(e) => { onKeyDown={(e) => {