Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Adding the TypeAhead widget inside a datatable breaks the flow when using keyboard navigation #582

Closed
ammar629 opened this issue May 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ammar629
Copy link

ammar629 commented May 9, 2024

Steps to reproduce

  1. Create a Datatable widget
  2. Assign the typeahead widget to more than one DataColumn cell
  3. Traverse the widgets with tab key

Expected results

Tab traversal has to be in the order of creation of widgets (Flutter framework default behavior)

Actual results

The tab key traversal excludes some of the widgets from focus

Package Version

5.2.0

Platform

Windows

Code sample

Code sample
        return Padding(
          padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 4.0),
          child: TypeAheadField<dynamic>(
            focusNode: _node,
            controller: myTextController,
            builder: (context, controller, focusNode) {
              return SizedBox(
                height: 40,
                child: AbsorbPointer(
                  absorbing: widget.readOnly,
                  child: TextField(
                    controller: controller,
                    focusNode: focusNode,
                    readOnly: widget.readOnly,
                    style: Theme.of(context).textTheme.labelLarge,
                    decoration: getInputDecoration(
                        context,
                        invalidate,
                        widget.dataTableLayout,
                        widget.fieldName,
                        widget.labelText),
                  ),
                ),
              );
            },
            suggestionsCallback: (search) async => searchStr(search, widget),
            itemBuilder: itemBuilderCallback,
            onSelected: _onSelectedCallback,
          ),
        );
      },
    );

Logs

No response

Screenshots or Video

Screenshots / Video demonstration
typeahead.traversal.bug.mp4
@ammar629 ammar629 added the bug Something isn't working label May 9, 2024
@clragon
Copy link
Collaborator

clragon commented May 26, 2024

Thank you for your issue.
This bug is most probably related to #579
The current way we do selected items in the suggestions box is most likely intefering with the focus travel.
For updates, please follow that issue instead.

@clragon clragon closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@ammar629
Copy link
Author

Sure thanks for your response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants