Skip to content

Commit 5b27067

Browse files
fix: [docs] scope the change callback notes to the changed callbacks
1 parent 084e9aa commit 5b27067

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.agents/skills/apsara/references/composition.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const [open, setOpen] = useState(false);
6565
</Dialog>
6666
```
6767

68-
Change callbacks (`onValueChange`, `onOpenChange`, `onInputValueChange`, and the like) take the new value first and a details object second: Base UI's `eventDetails` on components that wrap Base UI, or `details` with the same `reason` and `event` on components that own their state. Component data is a field of that object, for example `details.mode` on `ColorPicker` and `details.operation` on `FilterChip`.
68+
Most change callbacks (`onValueChange`, `onOpenChange`, `onInputValueChange`, and the like) take the new value first and a details object second. Components that wrap Base UI pass Base UI's `eventDetails`. Other components pass their own `details`, for example `details.mode` on `ColorPicker` and `details.operation` on `FilterChip`. A few callbacks take only the value, for example CodeBlock `onValueChange` and ColorPicker `onModeChange`. Check the props table for the exact signature.
6969

7070
Several overlay roots (`Dialog`, `Menu`, `Popover`, `Tooltip`) also expose `createHandle` for advanced imperative open/close from outside the subtree — use only when a trigger can't live in the same tree.
7171

‎apps/www/src/content/docs/(overview)/upgrading.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on [GitHub releases](https://github.com/raystack/apsara/releases).
99

1010
## Unreleased: change callbacks get a details object
1111

12-
Every change callback now passes a second argument after the value. A
12+
The change callbacks below pass a second argument after the value. A
1313
component that wraps Base UI passes Base UI's `eventDetails`. A component that
1414
keeps its own state passes a `details` object with the same `reason` and
1515
`event` fields, plus any field of its own.

0 commit comments

Comments
 (0)