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

Mixing FormGroup and InputGroup #573

Open
fredrikw opened this issue Sep 7, 2023 · 0 comments
Open

Mixing FormGroup and InputGroup #573

fredrikw opened this issue Sep 7, 2023 · 0 comments

Comments

@fredrikw
Copy link

fredrikw commented Sep 7, 2023

Mixing FormGroup and InputGroup puts "mb-3" on the wrong div.

The code:

	<InputGroup>
		<FormGroup floating label="Dose volume">
			<Input bind:value={dose_volume} type="number" placeholder="0" />
		</FormGroup>
		<InputGroupText>ml</InputGroupText>
	</InputGroup>

Renders as:

<div class="input-group">
	<div class="mb-3 form-floating">
		<input class="form-control" type="number" name="" placeholder="0">
		<label>Dose volume</label>
	</div>
	<span class="input-group-text">ml</span>
</div>

This will give the following result, please note the hanging "ml" part:
image

It should instead render as (see https://getbootstrap.com/docs/5.3/forms/floating-labels/#input-groups):

<div class="input-group mb-3 ">
	<div class="form-floating">
		<input class="form-control" type="number" name="" placeholder="0">
		<label>Dose volume </label>
	</div>
	<span class="input-group-text">ml</span>
</div>

yielding:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant