-
Notifications
You must be signed in to change notification settings - Fork 326
onclose for Dropdown #1789
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Brief explanation of the feature.
similar to what is currently available to Modal that way we can hook functions when a Dropdown is closed
Basic example
If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable.
<script lang="ts">
function onclose() {
console.log('Dropdown instance got closed')
// do request based on what's selected from the closed dropdown
}
</script>
<Dropdown {onclose}>
<DropdownItem>snip..</DropdownItem>
<DropdownItem>snip..</DropdownItem>
</Dropdown>
<Dropdown {onclose}>
<DropdownItem>snip..</DropdownItem>
<DropdownItem>snip..</DropdownItem>
</Dropdown>
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
We're using Dropdown in a similar case to MultiSelect (which has an onchange) but without the input
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request