I have 3 SFAutoComplete components, changing the value of the first one is resetting the selected values of the other two, each component is bound by SelectedItem property with a property in the view model.
When Items1_ChangedCommand selection changed event is triggered, I'm setting SelectedItem2 and SelectedItem3 to null, I also tried to call autoComplete.Clear() and autoComplete.IsFocused = false for them with no use.
Setting the SelectedItem2 and
SelectedItem3 to null is forcing the Focus and the suggestion box to be shown for both of them, which causes the suggestion box sometimes to be shown empty with this design.
<autocomplete:SfAutoComplete
DataSource="{Binding Items1}"
SelectedItem="{Binding SelectedItem1, Mode=TwoWay}"
DisplayMemberPath="Name"
ShowSuggestionsOnFocus="True" >
<autocomplete:SfAutoComplete.Behaviors>
<behaviors:EventToCommandBehavior EventName="SelectionChanged"
Command="{Binding Items1_ChangedCommand}" />
</autocomplete:SfAutoComplete.Behaviors>
</autocomplete:SfAutoComplete>
<autocomplete:SfAutoComplete
DataSource="{Binding Items2}"
SelectedItem="{Binding SelectedItem2, Mode=TwoWay}"
DisplayMemberPath=" Name"
ShowSuggestionsOnFocus="True" />
<autocomplete:SfAutoComplete
DataSource="{Binding Items3}"
SelectedItem="{Binding SelectedItem3, Mode=TwoWay}"
DisplayMemberPath=" Name"
ShowSuggestionsOnFocus="True" />
Hi,
This issue has come back when we upgraded to the release version 20.2.0.36,
could you please provide your feedback
Thanks
Hi John,
Patch version: 20.2.0.36
Disclaimer:
Please note that we have created this patch for version 20.2.0.36 specifically,
to resolve the issue reported in this incident. If you have received other
patches for the same version for other products, please apply all patches in
the order received.
Note: Please clear the NuGet cache, before using the latest one.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
This fix will be included in our upcoming weekly release which is expected to
roll out on mid of July 26, 2022. We appreciate your patience until then.
Regards,
Ruba Shanmugam
Hi
We have updated to weekly release V20.2.0.40, the issue has not been fixed yet, could you please provide your feedback.
Much appreciated.
Hi John,
Query: We have updated to weekly release V20.2.0.40, the issue has not been fixed yet
We have checked the reported issue with the latest version V20.2.0.40 and the issue was not replicated on our side. We have prepared a new sample and video for your reference and please get it from the attachments.
If your requirement is different, please explain to us briefly and share the replication steps with the sample. It will help us to provide the proper solution at the easiest. Please let us know if you need any other details.
Regards
Ruba Shanmugam
Hi,
Thanks for your reply, there is a slight difference between the provided sample and the reported issue. I've modified your project and provided a video.
Please note that in the reported issue, we are setting the bindable SelectedItem property directly to Null without accessing the Syncfusion component as we can't track this component in our ViewModel.
There is also this instant switch of focus to the first SfAutoComplete component, could you please tell us why this is happening? is it because we are changing the SelectedItem property directly?
Please let us know your feedback,
Much appreciated
Hi John,
Thanks for providing a sample. Currently, we are validating the reported issue and we will let you know the details on August 1, 2022. We appreciate your patience until then.
Regards,
Ruba Shanmugam
Hi John,
Query: There is also this instant switch of focus to the first SfAutoComplete component, could you please tell us why this is happening?
We have checked the reported query in the source. We have used the default TextBox added inside the ScrollView. We could able to replicate the focus jumps to the top-most TextBox when interacting with the Microsoft TextBox also. Please check the below link,
Find the issue link below,
https://github.com/microsoft/microsoft-ui-xaml/issues/597
In UWP by default design, any one of the elements will focus. So if we clear any focus the first AutoComplete gets focus by default. We have a workaround solution to resolve this issue. We can place an invisible button at the top of the layout. The button will be focused on when the layout was tapped. The AutoComplete will not be focused.
We have prepared a sample for your reference and please get it from the attachment. Please let us know if you have any other concerns.
Regards,
Ruba Shanmugam