Skip to content

fix: unable to navigate with arrow keys in FluentTextField contained within a DataGridCell of type Header #3742

@iainross

Description

@iainross

🐛 Bug Report

When a FluentTextField is contained within a FluentDataGridCell with CellType set to ColumnHeader the arrow keys do not allow left/right navigation through the entered text.

💻 Repro or Code Sample

Create a new app with the Fluent Blazor Web App template, add

<FluentDataGrid TGridItem="string">
    <FluentDataGridRow RowType="DataGridRowType.Header">
        <FluentDataGridCell CellType="DataGridCellType.ColumnHeader">
            <FluentTextField />
        </FluentDataGridCell>
    </FluentDataGridRow>
</FluentDataGrid>

to Counter.Razor. Type in the text box and try to arrow left/right. Removing the CellType property gets it working again.

🤔 Expected Behavior

The cursor to move left or right when the corresponding cursor key is pressed

😯 Current Behavior

Nothing happens

💁 Possible Solution

Seems like a duplicate of #3087 that applies only to this specific cell type, presumably that fix wasn't quite complete?

🔦 Context

Providing a text box inside the header to allow filters to be set and passed through to generate database queries to refresh the grid

🌍 Your Environment

  • OS & Device: Windows 11 development environment, also seen in live site running in Linux on Azure
  • Browser MIcrosoft Edge
  • .NET and Fluent UI Blazor library Version 9.0.203 and 4.11.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions