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

Autocomplete footer not allowing onClick #5279

Open
2 tasks done
jirom opened this issue May 30, 2024 · 2 comments
Open
2 tasks done

Autocomplete footer not allowing onClick #5279

jirom opened this issue May 30, 2024 · 2 comments
Labels
bug Something isn't working Primitive An issue or a feature-request for one or more UI Primitive

Comments

@jirom
Copy link

jirom commented May 30, 2024

How did you install the Amplify CLI?

No response

If applicable, what version of Node.js are you using?

No response

Amplify CLI Version

1.0.1

What operating system are you using?

Ubuntu (wsl2)

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

When using a component with an onClick attribute in the Footer menuSlot of Autocomplete, the onClick callback is not getting invoked.

When I click "See more results", the callback does not get invoked.

Expected behavior

Components in the footer should receive click events.

It looks like the footer was created to allow additional actions to be added. However components added to the footer don't seem to be receiving click events. If this is the expected mechanism to trigger actions, then it's not clear based on the documentation.

Reproduction steps

  1. Use the exact code from the example in the autocomplete documentation
  2. Update the Link component and add this attribute onClick={() => console.log('footer clicked')}
  3. Click on the "See more results..." link in the autocomplete

Result:

  • Autocomplete closes.
  • Nothing is printed in the console logs.

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@jirom jirom added the pending-triage Issue is pending triage label May 30, 2024
@AnilMaktala
Copy link
Member

AnilMaktala commented May 30, 2024

Hi @jirom, Thanks for raising this. Transferring to the amplify-ui repo for better assistance.

@AnilMaktala AnilMaktala added the transferred This issue was transferred from another Amplify project label May 30, 2024
@AnilMaktala AnilMaktala transferred this issue from aws-amplify/amplify-category-api May 30, 2024
@cwomack cwomack transferred this issue from aws-amplify/amplify-js May 30, 2024
@thaddmt thaddmt added Primitive An issue or a feature-request for one or more UI Primitive bug Something isn't working and removed pending-triage Issue is pending triage labels May 30, 2024
@thaddmt
Copy link
Contributor

thaddmt commented May 31, 2024

Verified this is a bug in auto complete with the ordering of onBlur and onClick events. Here is a stackblitz that shows how to reproduce / work around while we get this fixed - https://stackblitz.com/edit/nextjs-gqdmlo?file=app%2Fpage.tsx

@reesscot reesscot removed the transferred This issue was transferred from another Amplify project label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Primitive An issue or a feature-request for one or more UI Primitive
Projects
None yet
Development

No branches or pull requests

5 participants
@jirom @AnilMaktala @reesscot @thaddmt and others