searchfield icon indicating copy to clipboard operation
searchfield copied to clipboard

If the selected item’s position is greater than 10, auto scrolling won’t happen for that item.

Open santhosh-g-tz opened this issue 1 year ago • 8 comments

Hi,

The scroll navigation not working if the current selected item position is more than 10. Note: my maxSuggestionsInViewPort is 10. windows

var countries = [
  'United States',
  'Germany',
  'Canada',
  'United Kingdom',
  'France',
  'Italy',
  'Spain',
  'Australia',
  'India',
  'China',
  'Japan',
  'Brazil',
  'South Africa',
  'Mexico',
  'Argentina',
  'Russia',
  'Indonesia',
  'Turkey',
  'Saudi Arabia',
  'Nigeria',
  'Egypt',
];

SearchField<String>(
  maxSuggestionsInViewPort:10,
  suggestions: countries
      .map(
        (e) => SearchFieldListItem<String>(
      e,
      item: e,
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Text(e),
      ),
    ),
  ).toList(),
);

https://github.com/user-attachments/assets/5dcecff3-fc7a-415c-95da-b8ca953f7328

santhosh-g-tz avatar Jul 18 '24 08:07 santhosh-g-tz