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

docs: add onChange documentation in dev guidelines #3643

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/content/develop/component-guidelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ import type RAC from 'react-aria-components';
export interface ComponentProps extends RAC.ColumnProps {}
```

### The `onChange` method

We have a slight different naming of some `onChange` functions. This can cause confusion when using it. We have react arias `onInputChange` method which we use for our `Combobox` and `AutoComplete` as `onChange`.

Than we have react arias `onSelectionChange` which is used to handle the selection of an input. We use this in `ComboBox`, the same in `Autocomplete` but there we map it internally on `onSubmit`.

`Select` is a special case because we just have one on change handler, thats why we currently have `onSelectionChange` as `onChange` there.

## Styling

### Exposing className on UI Components
Expand Down
Loading