We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

AutoComplete - problem with scrolling inside control

Hello,

I have problem with autocomplete control. When control is set to token mode with multi select mode, doesn't work properly, inside the control scroll view. Scrolling selected tokens inside the control does not work like without scroll view control as parent.
Below example layout:

 <ScrollView>
        <StackLayout> 
            <autocomplete:SfAutoComplete    
                x:Name="autoComplete"  
                AutoCompleteMode="SuggestAppend"      
                SuggestionMode="Contains"
                MultiSelectMode="Token" 
                TokensWrapMode="Wrap"    
                TextHighlightMode="MultipleOccurrence"
                HighlightedTextColor="Red" 
                EnableSelectionIndicator="true" 
                IsSelectedItemsVisibleInDropDown="false"     
                TextSize="12"  
                MaximumSuggestion="3" 
                NoResultsFoundText="" 
                MinimumPrefixCharacters="3"  
                HeightRequest="50"
                ShowClearButton="True"   > 
                <autocomplete:SfAutoComplete.TokenSettings>
                    <autocomplete:TokenSettings FontSize="10" />
                </autocomplete:SfAutoComplete.TokenSettings>
            </autocomplete:SfAutoComplete>
            <Label Text="test"></Label>     
           ...... (more than 50 for example)
          .......
            <Label Text="test"></Label> 
        </StackLayout>
    </ScrollView>



Best regards,
Mariusz Zębik

3 Replies

HM Hemalatha Marikumar Syncfusion Team January 24, 2020 12:50 PM UTC

Hi Mariusz,

Greetings from Syncfusion.

We have analyzed your query and you can fulfil this requirement by enabling the EnableAutoSize property of SfAutoComplete as like below code snippet. 

XAML: 
<autocomplete:SfAutoComplete 
                x:Name="autoComplete" EnableAutoSize="True"  DataSource="{Binding EmployeeCollection}" SelectionChanged="AutoComplete_SelectionChanged" DisplayMemberPath="Name" 
                AutoCompleteMode="SuggestAppend"      
                SuggestionMode="Contains" 
                MultiSelectMode="Token" 
                TokensWrapMode="Wrap"    
                TextHighlightMode="MultipleOccurrence" 
                HighlightedTextColor="Red" 
                EnableSelectionIndicator="true" 
                IsSelectedItemsVisibleInDropDown="false"     
                TextSize="12"  
                MaximumSuggestion="3" 
                NoResultsFoundText="" 
                MinimumPrefixCharacters="3"  
                HeightRequest="50" 
                ShowClearButton="True"   /> 
       

Please let us know if you have any other queries. 
 
Regards, 
Hemalatha M. 



MZ Mariusz Zebic January 24, 2020 01:35 PM UTC

Hello,

Yes of course , that is solution for my requirements, but scrolling inside the control that is bug to fix :)  

Best regards,
Mariusz Zębik


HM Hemalatha Marikumar Syncfusion Team January 27, 2020 12:08 PM UTC

Hi Mariusz,

Thanks for your update.

We have used the ScrollView for scroll the selected token collection in our source, so when used SfAutoComplete inside the scrollview, the scrolling is working for parent not for the child views. So that we have implemented EnableAutoSize property.   
 
 
Android already have nested scrollview but that only supports from API 21. AutoComplete supports from API 19, so we have using the normal scroll view in our control. In future API upgradation we resolve the issue from our side.  
 
Regards, 
Hemalatha M. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon