Skip to content

Commit

Permalink
Improve docs around Events (#280)
Browse files Browse the repository at this point in the history
* Slightly clearer events descriptions

* minor wording
  • Loading branch information
briandonahue committed Jan 16, 2024
1 parent 63f8839 commit f271393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,13 @@ Example using several slots:
on:add={(event) => console.log(event.detail.option)}
```

Triggers when a new option is selected.
Triggers when a new option is selected. The newly selected option is provided as `event.detail.option`.

1. ```ts
on:remove={(event) => console.log(event.detail.option)}`
```

Triggers when one selected option provided as `event.detail.option` is removed.
Triggers when a single selected option is removed. The removed option is provided as `event.detail.option`.

1. ```ts
on:removeAll={(event) => console.log(event.detail.options)}`
Expand All @@ -481,7 +481,7 @@ Example using several slots:
on:change={(event) => console.log(`${event.detail.type}: '${event.detail.option}'`)}
```
Triggers when an option is either added or removed, or all options are removed at once. `type` is one of `'add' | 'remove' | 'removeAll'` and payload will be `option: Option` or `options: Option[]`, respectively.
Triggers when an option is either added (selected) or removed from selected, or all selected options are removed at once. `type` is one of `'add' | 'remove' | 'removeAll'` and payload will be `option: Option` or `options: Option[]`, respectively.
1. ```ts
on:open={(event) => console.log(`Multiselect dropdown was opened by ${event}`)}
Expand Down

0 comments on commit f271393

Please sign in to comment.