Changing Value property, then back to initialized value does not display the initialized value

The following code uses a DropDownList to select from three values. The selected value is supposed to display in the InPlaceEditor Value property. Works fine selecting and displaying values OTHER than the initialized value ("4.7"). When I select the initialized value, InPlaceEditor continues to display the previously selected value.

(NOTE: the code works as expected when used with SfTextBox alone)


<SfInPlaceEditor Mode="RenderMode.Inline"

                 EditableOn="EditableType.Click"

                 Type="InputType.Text"

                 TValue="string"

                 ShowButtons="false"

                 Value="@QuantityToShow.Value">

    <EditorComponent>

        <SfTextBox Value="@QuantityToShow.Value"></SfTextBox>

    </EditorComponent>

</SfInPlaceEditor>



<SfDropDownList TValue="int"

                TItem="QuantityModel"

                DataSource="@QuantityList"

                Value="@SelectedUnit">

    <DropDownListTemplates TItem="QuantityModel">

        <ItemTemplate>

            <span>

                <span>@context.Value</span> <span>@context.Symbol</span>

            </span>

        </ItemTemplate>

        <ValueTemplate>

            <span>@context.Symbol</span>

        </ValueTemplate>

    </DropDownListTemplates>

    <DropDownListEvents TItem="QuantityModel" TValue="int" ValueChange="UnitChange"></DropDownListEvents>

    <DropDownListFieldSettings Text="Symbol" Value="UnitValue"></DropDownListFieldSettings>

</SfDropDownList>



@code

{

    protected ObservableCollection<QuantityModel> QuantityList = new();

    protected QuantityModel QuantityToShow = new();

    protected int SelectedUnit { get; set; }


    protected override void OnInitialized()

    {

        QuantityToShow = new QuantityModel { Value = "4.7", Symbol = "SRM", UnitValue = 0 };


        QuantityList.Add(new QuantityModel { Value = "4.7", Symbol = "SRM", UnitValue = 0 });

        QuantityList.Add(new QuantityModel { Value = "9.2", Symbol = "EBC", UnitValue = 1 });

        QuantityList.Add(new QuantityModel { Value = "4.0", Symbol = "L", UnitValue = 2 });


        SelectedUnit = QuantityToShow.UnitValue;

    }


    protected void UnitChange(ChangeEventArgs<int, QuantityModel> args)

    {

        QuantityToShow = args.ItemData;

        SelectedUnit = args.Value;

    }


    public class QuantityModel

    {

        public string Value { get; set; }

        public int UnitValue { get; set; }

        public string Symbol { get; set; }

    }

}


4 Replies

VJ Vinitha Jeyakumar Syncfusion Team September 6, 2022 01:39 PM UTC

Hi Dave,


We have considered your reported issue "Initialized value not updated in In-Place Editor textbox when we re change the value" as a bug from our end and the fix for the issue will be included with our upcoming patch release on 20th September 2022.

Now you can track the status of the reported issue through the below feedback link,

Regards,
Vinitha


VJ Vinitha Jeyakumar Syncfusion Team September 21, 2022 10:01 AM UTC

Hi Dave,


We are facing some complexity in fixing the reported. So we will include the fix with our upcoming Vol 3 main release which is expected to be rolled out on the end of September 2022.


Regards,
Vinitha




VJ Vinitha Jeyakumar Syncfusion Team September 30, 2022 01:43 PM UTC

Hi Dave,


We couldn't include the fix for the issue due to its complexity. we will include the fix with our upcoming patch release on 11th October 2022.

Regards,
Vinitha


VJ Vinitha Jeyakumar Syncfusion Team November 14, 2022 05:03 AM UTC

Hi Dave,


We have included the fix for the issue "Initialized value not updated in In-Place Editor textbox when we re change the value" with our Vol 3 SP release V20.3.56. So please upgrade your package to the latest to resolve the issue from your end.

Regards,
Vinitha

Loader.
Up arrow icon