Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

[Feature Request] Add onTap prop #22

Open
sergiotucano opened this issue Aug 1, 2022 · 2 comments
Open

[Feature Request] Add onTap prop #22

sergiotucano opened this issue Aug 1, 2022 · 2 comments
Labels
wontfix This will not be worked on

Comments

@sergiotucano
Copy link

Hi !

My suggestion is add the prop onTap.

Tanks!

@bohan0
Copy link

bohan0 commented Jan 13, 2023

You can handle onTap by using a InkResponse inside your suggestionsBuilder handler.

e.g.

EasyAutocomplete(
        autofocus: true,
        onChanged: (_) {},
        progressIndicatorBuilder: Container(),
        suggestionBuilder: (data) {
          return InkResponse(
                onTap: () {
                     //perform onTap tasks here when a suggestion is tapped
                } 
                child: Container())
        }
)

@4inka
Copy link
Owner

4inka commented May 2, 2023

Hello @sergiotucano,

First of all I would like to apologize for the late reply.
Since the idea is to whenever a suggestion is tapped (default or custom) is to transfer the text of the selected item to the textfield unfortunately I don't plan on adding a custom onTap function for now. But you can always use the suggestion presented by @bohan0

Have a nice day

@4inka 4inka added the wontfix This will not be worked on label May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants