AbdulRahmanAlHamali / flutter_typeahead

A TypeAhead widget for Flutter, where you can show suggestions to users as they type
BSD 2-Clause "Simplified" License
831 stars 349 forks source link

[Bug] TypeAheadField with 'direction' property set to VerticalDirection.up is not focused. #565

Closed yj-abe closed 6 months ago

yj-abe commented 10 months ago

Steps to reproduce

  1. Write a program like the following.
      Column(
        children: [
          TextFormField(
            textInputAction: TextInputAction.next,
          ),
          TypeAheadField<String>(
            direction: VerticalDirection.up,
            itemBuilder: (context, value) {
              return Text(value);
            },
            onSelected: (value) {},
            suggestionsCallback: (search) {
              return ['test'];
            },
          ),
        ],
      ),
  1. Enter text in the first TextFormField and click the next button on the keyboard.

Expected results

Focus moves to next TypeAheadField.

Actual results

TypeAheadField is not focused. If I set direction of TypeAheadField to VerticalDirection.down, it works fine.

Package Version

5.1.0

Platform

Android, iOS

Code sample

Code sample ```dart Column( children: [ TextFormField( textInputAction: TextInputAction.next, ), TypeAheadField( direction: VerticalDirection.up, itemBuilder: (context, value) { return Text(value); }, onSelected: (value) {}, suggestionsCallback: (search) { return ['test']; }, ), ], ), ```

Logs

Logs nothing

Screenshots or Video

Screenshots / Video demonstration nothing
clragon commented 9 months ago

Reproducible on 5.2.0

clragon commented 6 months ago

This issue is most likely related to #579 and will be fixed when the changes there are implemented. Please follow that issue instead. Thank you!