Closed solamanhuq closed 1 year ago
Hello!
First of all, if you are using @cloudscape-design/components
, we recommend reaching out to us via https://github.com/cloudscape-design/components repository. The aws/awsui-documentation
repo is only for legacy @awsui/components-react
package.
To answer your actual question, it seems like there is a typo in your code. The handler is called handleSelect
and you pass this.onSelect
.
Also, note that options
should not be an array of strings, but an array of objects like this [{value: 'option 1'}, {value:'option 2'}],
Describe the bug As the title suggests, if I provide an
onSelect
hook for Autosuggest, it does not trigger.To Reproduce We can set up an arbitrary
Autosuggest
component. We can pass a method toonSelect
that throws if called. Note that this does not throw:Environment (please complete the following information):
Additional context Add any other context about the problem here.