ListBox stop working after update 18.3.0.35 and 18.3.0.40

ListBox dual work in version 18.2 but only by buttons items not by drag and drop, but in previous versions Scope was pointed by string not SfListbox object
ListBox is in Grid dialog template
In atachement there are video of how is working now

<div class="form-row" style="clear:both !important;">
        <div class="form-group col-xs-7 col-sm-7 col-lg-7 col-md-7">
            <label style="text-align: center;">
                @Localizer.GetText("PossibleChange")
            </label>
            <SfListBox @ref="_listbox1" TValue="string[]" AllowDragAndDrop="true" DataSource="@listbox1" Scope="@scope1" TItem="MappedSimpleShifts">
                <ListBoxEvents Created="Created" TValue="string[]" TItem="MappedSimpleShifts"></ListBoxEvents>
                <ListBoxToolbarSettings Items="@items"></ListBoxToolbarSettings>
                <ListBoxFieldSettings Text="Name" Value="ShiftID"></ListBoxFieldSettings>
            </SfListBox>
        </div>
        <div class="form-group col-xs-5 col-sm-5 col-lg-5 col-md-5">
            <label style="text-align: center;">
                @Localizer.GetText("ActiveChange")
            </label>
            <SfListBox @ref="_listbox2" TValue="string[]" AllowDragAndDrop="true" DataSource="@listbox2" Scope="@scope2" TItem="MappedSimpleShifts">
                <ListBoxEvents Created="Created" TValue="string[]" TItem="MappedSimpleShifts"></ListBoxEvents>
                <ListBoxFieldSettings Text="Name" Value="ShiftID"></ListBoxFieldSettings>
            </SfListBox>
        </div>
    </div>

SfListBox<string[], MappedSimpleShifts> _listbox1;
    SfListBox<string[], MappedSimpleShifts> _listbox2;

    SfListBox<string[], MappedSimpleShifts> scope1;
    SfListBox<string[], MappedSimpleShifts> scope2;

protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        await base.OnAfterRenderAsync(firstRender);
        if (firstRender)
        {
            scope1 = _listbox2;
            scope2 = _listbox1;
            StateHasChanged(); // Re-render component to update the ListBox component Scope references in each connected ListBox.
        }
    }

 public void Created()
    {
        StateHasChanged();
    }


Attachment: listboxdual_6ba504d4.zip

1 Reply

MK Mohan Kumar Ramasamy Syncfusion Team October 14, 2020 08:05 AM UTC

Hi Blazej, 
 
We have checked your reported query, we are unable to reproduce the reported issue in our end. For your reference we have prepared a sample based on this, please refer below code snippets and sample link. 
 
 
<div class="dual-list-wrapper"> 
    <div class="dual-list-groupa"> 
        <h4> Group A</h4> 
  <SfListBox @ref="listbox1" Scope="@listbox2" DataSource="@GroupA" TItem="ListData" Height="330px" TValue="string[]" AllowDragAndDrop="true"> 
   <ListBoxFieldSettings Text="Name" Value="Code"></ListBoxFieldSettings> 
   <ListBoxEvents Created="Created" TItem="ListData" TValue="string[]"></ListBoxEvents> 
   <ListBoxToolbarSettings Items="@Items"></ListBoxToolbarSettings> 
     </SfListBox> 
      </div> 
 <div class="dual-list-groupb"> 
      <h4>Group B</h4> 
  <SfListBox @ref="listbox2" Scope="@listbox1" DataSource="@GroupB" Height="330px" TItem="ListData" TValue="string[]" AllowDragAndDrop="true"> 
  <ListBoxFieldSettings Text="Name" Value="Code"></ListBoxFieldSettings> 
   <ListBoxEvents Created="Created" TItem="ListData" TValue="string[]"></ListBoxEvents> 
    </SfListBox> 
     </div> 
      </div> 
 
 
If you are still facing the issue, kindly share the below details. 
 
  • If possible, try to reproduce the reported issue in provided sample or share the issue reproducible sample
Please provide the above requested information, based on that we will check and provide you a better solution quickly. 
 
Regards 
Mohan kumar R 


Loader.
Up arrow icon