Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The width of InputNumber cannot fill the form. #2669

Closed
simonguo opened this issue Aug 23, 2022 · 0 comments · Fixed by #2689
Closed

The width of InputNumber cannot fill the form. #2669

simonguo opened this issue Aug 23, 2022 · 0 comments · Fixed by #2689

Comments

@simonguo
Copy link
Member

What version of rsuite are you using?

5.16.6

What version of React are you using?

17.0.1

What version of TypeScript are you using (if any)?

all

What browser are you using?

all

Describe the Bug

When the layout of the form is fluid, the width of Input will fill the container, but InputNumber and InputGroup will not.

image

Expected Behavior

image

To Reproduce

https://codesandbox.io/s/goofy-nightingale-nypxzf

const Textarea = React.forwardRef((props, ref) => (
  <Input {...props} as="textarea" ref={ref} />
));

const App = () => (
  <Form fluid>
    <Form.Group controlId="input">
      <Form.ControlLabel>Input</Form.ControlLabel>
      <Form.Control name="input" />
    </Form.Group>

    <Form.Group controlId="textarea">
      <Form.ControlLabel>Textarea</Form.ControlLabel>
      <Form.Control rows={5} name="textarea" accepter={Textarea} />
    </Form.Group>

    <Form.Group controlId="input">
      <Form.ControlLabel>Input Group</Form.ControlLabel>
      <InputGroup>
        <InputGroup.Addon> @</InputGroup.Addon>
        <Form.Control name="input" />
      </InputGroup>
    </Form.Group>

    <Form.Group>
      <Form.ControlLabel>InputNumber</Form.ControlLabel>
      <Form.Control name="numder" accepter={InputNumber} />
    </Form.Group>
  </Form>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant