Skip to content

Updated documentation on selection event #425

Open
@justingolden21

Description

@justingolden21

Is your feature request related to a problem? Please describe.

It was difficult to figure out how to programmatically get the resulting selection when an autocomplete item is selected.

Thoroughly Describe the solution you'd like

Documentation on the selection event. Same code:

events: {
	input: {
		selection(event) {
			const feedback = event.detail;
			const selection = feedback.selection.value[feedback.selection.key];
			console.log(selection);
			console.log(feedback.selection);
		}
	}
}

Please provide a few use cases for this feature

  1. I imagine most programmers will want to do something with the data they select, otherwise there would be no reason to use this library other than for mockups

Please Describe alternatives you've considered

I searched through the docs on configuration and was unable to find it:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions