Skip to content

Commit

Permalink
To add text-nowrap if HxGrid ContentNavigationModeEffective == Infini…
Browse files Browse the repository at this point in the history
…teScroll so the Blazor Virtualize doesnt break with vriable line height.
  • Loading branch information
crdo committed Oct 26, 2023
1 parent ac4152e commit a235cfc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Havit.Blazor.Components.Web.Bootstrap/Grids/HxGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public partial class HxGrid<TItem> : ComponentBase, IDisposable
[Parameter, EditorRequired] public GridDataProviderDelegate<TItem> DataProvider { get; set; }

/// <summary>
/// Indicates whether single data item selection is enabled.
/// Indicates whether single data item selection is enabled.
/// Selection is performed by click on the item row.
/// Can be combined with multiselection.
/// Default is <c>true</c>.
/// </summary>
[Parameter] public bool SelectionEnabled { get; set; } = true;

/// <summary>
/// Indicates whether multi data items selection is enabled.
/// Indicates whether multi data items selection is enabled.
/// Selection is performed by checkboxes in the first column.
/// Can be combined with (single) selection.
/// Default is <c>false</c>.
Expand Down Expand Up @@ -75,13 +75,13 @@ public partial class HxGrid<TItem> : ComponentBase, IDisposable
/// <summary>
/// Selected data item.
/// Intended for data binding.
/// </summary>
/// </summary>
[Parameter] public TItem SelectedDataItem { get; set; }

/// <summary>
/// Event fires when selected data item changes.
/// Intended for data binding.
/// </summary>
/// </summary>
[Parameter] public EventCallback<TItem> SelectedDataItemChanged { get; set; }
/// <summary>
/// Triggers the <see cref="SelectedDataItemChanged"/> event. Allows interception of the event in derived components.
Expand All @@ -91,13 +91,13 @@ public partial class HxGrid<TItem> : ComponentBase, IDisposable
/// <summary>
/// Selected data items.
/// Intended for data binding.
/// </summary>
/// </summary>
[Parameter] public HashSet<TItem> SelectedDataItems { get; set; }

/// <summary>
/// Event fires when selected data items changes.
/// Intended for data binding.
/// </summary>
/// </summary>
[Parameter] public EventCallback<HashSet<TItem>> SelectedDataItemsChanged { get; set; }
/// <summary>
/// Triggers the <see cref="SelectedDataItemsChanged"/> event. Allows interception of the event in derived components.
Expand Down Expand Up @@ -408,7 +408,8 @@ protected virtual string GetTableElementCssClass(bool rendersData)
return CssClassHelper.Combine("hx-grid table",
hoverable ? "table-hover" : null,
this.StripedEffective ? "table-striped" : null,
this.TableCssClassEffective);
this.TableCssClassEffective,
this.ContentNavigationModeEffective == GridContentNavigationMode.InfiniteScroll ? "text-nowrap" : null);
}

/// <summary>
Expand Down

0 comments on commit a235cfc

Please sign in to comment.