Radzen Dialog not updating Text field until right before dialog close

I had read about the previously known bug that prevented Text fields on dialogs from updating. The previous ticket indicated that the issue was resolved in a future update. I updated my nuget package to 4.29.2 as the ticket suggested, however I still didnt see the field update. when I clicked on the dialog header "X" to close the dialog, I saw the value update quickly before close. When I open the dialog back up the value is there. The text value is being updated when a dropdowndatagrid is changed. I have placed breakpoints and I see the change is detected, and the variable value is being updated, I just dont see it change until right before close.

async Task ShowInlineDialog()
{
    var result = await DialogService.OpenAsync(String.Empty, ds => 
    @<div>
        <RadzenRow Gap="@gap">
            <RadzenColumn Size="12">
                <RadzenButton Text="Save" Click="() => AddOrderLine(newPrid, newQuantity)" Style="width: 80px;" />
                <RadzenButton Text="Next" ButtonStyle="ButtonStyle.Light" />
                <RadzenButton Text="Previous" ButtonStyle="ButtonStyle.Light" />
                <RadzenButton Text="Clear" ButtonStyle="ButtonStyle.Light" />
            </RadzenColumn>
        </RadzenRow>
        <RadzenRow Gap="@gap">
            <RadzenColumn Size="6">
                <RadzenRow Gap="@gap">
                    <RadzenFormField Text="Part" Variant="@variant" Style="width: 100%;">
                        <RadzenDropDownDataGrid @bind-Value=@newPrid Data=@Products TextProperty="pr_codenum" ValueProperty="pr_id"
                                            AllowColumnResize="true" AllowFilteringByAllStringColumns="true" Name="DropDownDataGridColumns" Change="PartChanged">
                            <Columns>
                                <RadzenDropDownDataGridColumn Property="pr_codenum" Title="Name" Width="200px" />
                                <RadzenDropDownDataGridColumn Property="pr_descrip" Title="Description" Width="200px" />
                            </Columns>
                        </RadzenDropDownDataGrid>
                    </RadzenFormField>
                </RadzenRow>
                <RadzenRow Gap="@gap">
                    <RadzenFormField Text="Quantity" Variant="@variant" Style="width: 100%;">
                        <RadzenNumeric @bind-Value="@newQuantity" />
                    </RadzenFormField>
                </RadzenRow>
            </RadzenColumn>
            <RadzenColumn Size="6">
                <RadzenRow Gap="@gap">
                <RadzenFormField Text="Description" Variant="@variant" Style="width: 100%;">
                        <RadzenTextBox @bind-Value=@description />
                    </RadzenFormField>
                </RadzenRow>
            </RadzenColumn>
        </RadzenRow>
    </div>, new DialogOptions() { ShowTitle = true, Style = "min-height:786px;min-width:1024px;", CloseDialogOnEsc = true, Draggable = true });
}

private void PartChanged(object poValue)
{
    var lnPrid = (int)poValue;
    var Temproduct = DbContext.Products.Where(x => x.pr_id == lnPrid).ToList();
    description = Temproduct[0].pr_descrip;
}

The "Part" dropdowndatagrid calls the PartChanged method, which in turn updates the value for @description.

I think that fix was in the JavaScript file so you may still be using a cached version. Try clearing your browser cache.

After clearing browser cache I'm still seeing the same thing. I did notice that if I click in the title section of the dialog the description field updates. I tried clicking everywhere else on the page and nothing, but if I click in the dialog title or right click in browser, the field updates. I also checked Dev tools and I have no errors or missing files.

This seems to be a different problem altogether. I suggest creating a separate component for the dialog contents instead of defining it inline.

1 Like

@korchev once I moved the dialog content to its own file everything works as expected. Thank you for the help