Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
- Fix #2669
- Make Reset and set width methods public
  • Loading branch information
vnbaaij committed Sep 17, 2024
commit 06b58eb2c8ea33e3de0ea8c385e5635be1440979
Original file line number Diff line number Diff line change
Expand Up @@ -8233,7 +8233,7 @@
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1.JSRuntime">
<summary />
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1._jsModule">
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1.Module">
<summary />
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1.Min">
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Components/DataGrid/Columns/ColumnBase.razor
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{
@if (Grid.ResizeType is not null)
{
<FluentButton Appearance="Appearance.Stealth" class="col-options-button" @onclick="@(() => Grid.ShowColumnOptionsAsync(this))" aria-label="Filter this column">
<FluentButton Appearance="Appearance.Stealth" class="col-options-button" @onclick="@(() => Grid.ShowColumnOptionsAsync(this))" aria-label="Resize/filter this column">
<FluentIcon Value="@(new CoreIcons.Regular.Size24.ChevronDown())" Color="Color.Neutral" Width="20px" Style="opacity: 0.5;" />
</FluentButton>
}
Expand Down
49 changes: 37 additions & 12 deletions src/Core/Components/DataGrid/FluentDataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,47 @@
scope="col"
TGridItem="TGridItem">
@col.HeaderContent
@if (col == _displayOptionsForColumn)

@if (HeaderCellAsButtonWithMenu)
{
<div class="col-options">
@if (col == _displayOptionsForColumn)
{
<div class="col-options">
@col.ColumnOptions
</div>
}
@if (ResizableColumns && col == _displayResizeForColumn)
{
<div class="col-resize">
</div>
}
@if (ResizableColumns && col == _displayResizeForColumn)
{
<div class="col-resize">

@if (ResizeType is not null)
{
<ColumnResizeOptions Column="@oneBasedIndex" ResizeType=@ResizeType TGridItem="TGridItem" />
}
@if (ResizeType is not null)
{
<ColumnResizeOptions Column="@oneBasedIndex" ResizeType=@ResizeType TGridItem="TGridItem" />
}

</div>
</div>
}
}
else
{
@if (col == _displayOptionsForColumn)
{
<div class="col-options">
<FluentStack Orientation="Orientation.Vertical">
@col.ColumnOptions
@if (ResizeType is not null)
{
@if (@col.ColumnOptions is not null)
{
<FluentDivider Role="DividerRole.Separator" Style="width: 100%;" />
}

<ColumnResizeOptions Column="@oneBasedIndex" ResizeType=@ResizeType TGridItem="TGridItem" />
}

</FluentStack>
</div>
}
}

@if (ResizableColumns)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Components/DataGrid/FluentDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -765,23 +765,23 @@ public async Task OnKeyDownAsync(FluentKeyCodeEventArgs args)
//return Task.CompletedTask;
}

internal async Task SetColumnWidthDiscreteAsync(int? columnIndex, float widthChange)
public async Task SetColumnWidthDiscreteAsync(int? columnIndex, float widthChange)
{
if (_gridReference is not null && Module is not null)
{
await Module.InvokeVoidAsync("resizeColumnDiscrete", _gridReference, columnIndex, widthChange);
}
}

internal async Task SetColumnWidthExactAsync(int columnIndex, int width)
public async Task SetColumnWidthExactAsync(int columnIndex, int width)
{
if (_gridReference is not null && Module is not null)
{
await Module.InvokeVoidAsync("resizeColumnExact", _gridReference, columnIndex, width);
}
}

internal async Task ResetColumnWidthsAsync()
public async Task ResetColumnWidthsAsync()
{
if (_gridReference is not null && Module is not null)
{
Expand Down