We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using Table to manage data with custom EditTemplate. My edit template component EditItemPanel has a field:
@typeparam TItem @inject IStringLocalizer<EditItemPanel<TItem>> L @code { [CascadingParameter] public ItemChangedType ChangedType { get; set; } [Parameter] [EditorRequired] public required TItem Model { get; set; } [Parameter] public string? NewTitle { get; set; } [Parameter] public string? EditTitle { get; set; } [Parameter] public RenderFragment<TItem>? NewItemTemplate { get; set; } [Parameter] [EditorRequired] public required RenderFragment<TItem> EditItemTemplate { get; set; } } <Panel> <Header> <div> @if (ChangedType == ItemChangedType.Add) { <h3>@(NewTitle ?? L.GetString("New Item"))</h3> } else { <h3>@(EditTitle ?? L.GetString("Edit Item"))</h3> } </div> <div class="flex-fill"></div> <div> <DialogCloseButton Icon="fa-solid fa-xmark" ButtonStyle="ButtonStyle.Round" Size="Size.Small" Text=""></DialogCloseButton> </div> </Header> <Body> <ValidateForm Model="@Model"> @if (ChangedType == ItemChangedType.Add) { if (NewItemTemplate != null) { @NewItemTemplate(Model) } else { @EditItemTemplate(Model) } } else { @EditItemTemplate(Model) } </ValidateForm> </Body> </Panel>
Then I use this compoent in table:
<Table TItem="AuthApp" IsPagination="true" PageItemsSource="@pageItemsSource" DataService="@dataService" CustomerSearchModel="filters" IsStriped="true" IsBordered="false" IsMultipleSelect="true" ShowToolbar="true" ShowSearch="true" ShowExtendButtons="true" ShowSkeleton="true" CollapsedTopSearch="true" ShowEmpty="true" SearchMode="SearchMode.Popup" SearchDialogSize="Size.Medium" EditMode="EditMode.Drawer" ShowAddButton="true" ShowExtendEditButtonCallback="@(o => true)" ShowExtendDeleteButtonCallback="@(o => true)"> <TableColumns> ...... </TableColumns> <CustomerSearchTemplate> ..... </CustomerSearchTemplate> <EditTemplate> <EditItemPanel Model="@context" NewTitle="@L.GetString("New App")" EditTitle="@L.GetString("Edit App")"> <EditItemTemplate Context="it"> ...... </EditItemTemplate> </EditItemPanel> </EditTemplate> </Table>
When clicking on the extension button "edit" on each row, the ChangedType is always Add value.
Clicking on the "edit" button on each row, it should pass ItemChangedType.Update to the EditTemplate's child component.
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
see above description
No response
9.0
The text was updated successfully, but these errors were encountered:
@cairabbit Thank you for reporting. We will give triage later.
Sorry, something went wrong.
@cairabbit could you submit a repro-project for this issue? thanks
Here is the repro-project: https://github.com/cairabbit/BlazorExample
@cairabbit fix in the version 9.0.2-beta04
ArgoZhang
Successfully merging a pull request may close this issue.
Is there an existing issue for this?
Describe the bug
I'm using Table to manage data with custom EditTemplate. My edit template component EditItemPanel has a field:
Then I use this compoent in table:
When clicking on the extension button "edit" on each row, the ChangedType is always Add value.
Expected Behavior
Clicking on the "edit" button on each row, it should pass ItemChangedType.Update to the EditTemplate's child component.
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
see above description
Exceptions (if any)
No response
.NET Version
9.0
Anything else?
No response
The text was updated successfully, but these errors were encountered: