Skip to content

Commit

Permalink
Add custom textbox in grid UI
Browse files Browse the repository at this point in the history
The textbox now can be a textarea for lyrics (or other long comments), a input[type=number] or an input[type=text] also when using the Grid UI. Previously, custom textboxes were used only for the "Single file view"
  • Loading branch information
dinoosauro authored Aug 19, 2024
1 parent 965dcaa commit 8df0955
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin
obj
publish
17 changes: 15 additions & 2 deletions App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,21 @@
{
<TemplateColumn Width="@((100 /(gridSelected.Count + 2)) + "%")" SortBy="gridSort(metadata)"
Title="@metadata.DisplayName" Sortable="true">
<FluentTextField Value="@TagValueHandler.GetCurrentValue(metadata.TagLibProperty, context)"
@onchange='(val) => UpdateValueFromEvent(val, metadata, context)' />
@if (metadata.ConvertValue ==
AvailableProperties.PropertiesObject.PropertiesType.STRING_TEXTAREA)
{
<FluentTextArea @onchange="(val) => UpdateValueFromEvent(val, metadata, context)"
value=@(TagValueHandler.GetCurrentValue(metadata.TagLibProperty, context))>
</FluentTextArea>
}
else
{
<FluentTextField @onchange="(val) => UpdateValueFromEvent(val, metadata, context)"
value=@(TagValueHandler.GetCurrentValue(metadata.TagLibProperty, context))
type=@(metadata.ConvertValue == AvailableProperties.PropertiesObject.PropertiesType.UINT ?
"number" : "text")>
</FluentTextField>
}
</TemplateColumn>
}
</FluentDataGrid><br>
Expand Down
25 changes: 0 additions & 25 deletions MetadataChange.generated.sln

This file was deleted.

0 comments on commit 8df0955

Please sign in to comment.