Skip to content

[dev-v5] fix: LabelPosition in FluentTextInput #4763

@MarvinKlein1508

Description

@MarvinKlein1508

🐛 Bug Report

When using LabelPosition.Before in any input component then the inputs will overlap each other when you use the Width parameter.

💻 Repro or Code Sample

@page "/Debug/Test"
@layout FluentUI.Demo.Client.Layout.EmptyLayout

<h3>Test</h3>


<div style="padding: 1rem">
    <FluentStack HorizontalGap="4px">
        <FluentTextInput @bind-Value="test"
                         Label="Werk"
                         LabelPosition="LabelPosition.Before"
                         Width="100px"
                         Placeholder="Name" />

        <FluentTextInput @bind-Value="test2"
                         Label="Suche"
                         LabelPosition="LabelPosition.Before"
                         Width="300px"
                         Placeholder="Artikelnummer, Auftragsnummer"
                         AutoComplete="off" />

        <FluentTextInput @bind-Value="test2"
                         Label="Company"
                         LabelPosition="LabelPosition.Before"
                         Width="200px"
                         Placeholder="Name" />
    </FluentStack>
</div>
@code {
    public string test { get; set; } = "test";
    public string test2 { get; set; } = "test2";
    public string test3 { get; set; } = "test3";
}

🤔 Expected Behavior

I expect all of the items to be displayed next to each other.

😯 Current Behavior

Image

💁 Possible Solution

🔦 Context

🌍 Your Environment

  • OS & Device: Windows 11 64 Bit
  • Browser latest Firefox, Chrome & Edge
  • latest dev-v5 branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bugv5For the next major version

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions