flutter_typeahead icon indicating copy to clipboard operation
flutter_typeahead copied to clipboard

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

Open yj-abe opened this issue 6 months ago • 1 comments

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
      Column(
        children: [
          TextFormField(
            textInputAction: TextInputAction.next,
          ),
          TypeAheadField<String>(
            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

yj-abe avatar Jan 30 '24 09:01 yj-abe

Reproducible on 5.2.0

clragon avatar Feb 08 '24 22:02 clragon