-
Notifications
You must be signed in to change notification settings - Fork 765
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
[WASM] DataGrid turns blank by tabbing on bottom cells #14311
[WASM] DataGrid turns blank by tabbing on bottom cells #14311
Comments
This appears to be specific to Chromium. |
@Youssef1313 any work-around we can employ? |
@jeromelaban Do we have any progress on workarounds we can try here? |
@darenm we have not yet found any reliable workaround for this issue, we're continuing to look into it. |
This comment was marked as outdated.
This comment was marked as outdated.
We shall take a look in our use-case and report back. |
Sorry for the incorrect information above. I rushed to conclusion.
You can workaround this issue, by either using the default fluent style or using an EditingElementStyle that is similar in size: <tc:DataGrid ...>
<tc:DataGrid.Resources>
<!-- method1: force fluent style within the control -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<tc:DataGrid.Columns>
<tc:DataGridTextColumn ...>
<tc:DataGridTextColumn.EditingElementStyle>
<!-- method2: use an EditingElementStyle that results in a similar size than the ElementStyle -->
<Style TargetType="TextBox">
<Setter Property="MaxHeight" Value="32" />
<!-- rest of the style... -->
</Style> As for the incorrect column snapping, I suspect it has the same root cause. One of the observation that I've made is that when the column has already expanded from entering edit-mode once, the snapping issue no longer occurs. The hypothesis here is that, on tab focusing change, we first perform a scroll-into-view with the column's normal width, and then resizing it for edit-mode... For this, the same fluent style trick will not work as they still have a width difference. But, you can workaround this by hardcoding a width for the column: <tc:DataGridTextColumn Width="120" MaxWidth="120" ... /> |
updated repro sample with other heads: u14311.zip |
Current behavior
Given a Datagrid with rows (some of them not visible unless it is scrolled) .
Start editing a cell , press Tab key several times to focus on the next cell.
after the last visible row, it starts displaying a blank overlay, see video.
DataGridTabBlank.mp4
When focusing on the next cell which is a not visible column, it should scroll horizontally to display the cell . If the focusing column is wider than the Grid's width, the column should align to the very left of the DataGrid. If the focusing column is narrower than the DataGrid, then the very right of the column should be aligned to the very right of the DataGrid.
See video:
DataGridTabBlank2.mp4
Expected behavior
Changing focus on the DataGrid cells should behave similarly as WinUI
How to reproduce it
Source UnoApp6.zip
Works on UWP/WinUI
Yes
Affected platforms
WebAssembly
The text was updated successfully, but these errors were encountered: