-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add setMounted setter function to disclosure store #2802
Conversation
🦋 Changeset detectedLatest commit: 906a76a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 906a76a:
|
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @ariakit/core@0.3.1 ### Patch Changes - [`#2801`](#2801) Fixed `values.slice` error that would occur when clicking on `FormCheckbox` that uses an integer-like field name. ## @ariakit/react@0.3.1 ### Patch Changes - [`#2804`](#2804) New in this version: [**Component providers**](https://ariakit.org/guide/component-providers) Component providers are optional components that act as a higher-level API on top of [component stores](https://ariakit.org/guide/component-stores). They wrap Ariakit components and automatically provide a store to them. - [`#2797`](#2797) Fixed a regression on `Dialog` regarding the timing of its "focus on hide" behavior. - [`#2801`](#2801) Fixed `values.slice` error that would occur when clicking on `FormCheckbox` that uses an integer-like field name. - [`#2802`](#2802) Added `setMounted` prop to `useDisclosureStore` and derived component stores. This callback prop can be used to react to changes in the `mounted` state. For example: ```js useDialogStore({ setMounted(mounted) { if (!mounted) { props.onUnmount?.(); } }, }); ``` - [`#2803`](#2803) The `Toolbar` component can now render without needing an explicit `store` prop or a `ToolbarProvider` component wrap. `Toolbar` now also supports certain store props such as `focusLoop`, `orientation`, `rtl`, and `virtualFocus`. - Updated dependencies: `@ariakit/react-core@0.3.1`. ## @ariakit/react-core@0.3.1 ### Patch Changes - [`#2797`](#2797) Fixed a regression on `Dialog` regarding the timing of its "focus on hide" behavior. - [`#2801`](#2801) Fixed `values.slice` error that would occur when clicking on `FormCheckbox` that uses an integer-like field name. - [`#2802`](#2802) Added `setMounted` prop to `useDisclosureStore` and derived component stores. This callback prop can be used to react to changes in the `mounted` state. For example: ```js useDialogStore({ setMounted(mounted) { if (!mounted) { props.onUnmount?.(); } }, }); ``` - [`#2803`](#2803) The `Toolbar` component can now render without needing an explicit `store` prop or a `ToolbarProvider` component wrap. `Toolbar` now also supports certain store props such as `focusLoop`, `orientation`, `rtl`, and `virtualFocus`. - Updated dependencies: `@ariakit/core@0.3.1`. ## @ariakit/test@0.2.4 ### Patch Changes - Updated dependencies: `@ariakit/core@0.3.1`. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR adds a
setMounted
prop touseDisclosureStore
and derived component stores. This callback prop can be used to react to changes in themounted
state. For example: