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

Improve checkbox examples #2456

Merged
merged 3 commits into from May 23, 2023
Merged

Improve checkbox examples #2456

merged 3 commits into from May 23, 2023

Conversation

diegohaz
Copy link
Member

@diegohaz diegohaz commented May 23, 2023

This PR improves the current checkbox docs and fixes two related issues:

  • The Checkbox component now accepts string[] as the value prop. This is to conform with the native input prop type. If a string array is passed, it will be stringified, just like in the native input element.

  • Fixed the clickOnEnter prop on Checkbox not working when rendering the component as a native input element.

@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ariakit ✅ Ready (Inspect) Visit Preview May 23, 2023 5:40pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
reakit ⬜️ Ignored (Inspect) May 23, 2023 5:40pm

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2023

🦋 Changeset detected

Latest commit: d033ed3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@ariakit/react-core Patch
@ariakit/react Patch

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 23, 2023

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 d033ed3:

Sandbox Source
Ariakit Configuration

@diegohaz diegohaz merged commit 0f58e63 into main May 23, 2023
15 checks passed
@diegohaz diegohaz deleted the checkbox-examples branch May 23, 2023 17:54
@github-actions github-actions bot mentioned this pull request May 23, 2023
diegohaz pushed a commit that referenced this pull request May 30, 2023
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/react@0.2.4

### Patch Changes

- The `Checkbox` component now accepts `string[]` as the `value` prop.
This is to conform with the native input prop type. If a string array is
passed, it will be stringified, just like in the native input element.
([#2456](#2456))

- Fixed the `clickOnEnter` prop on `Checkbox` not working when rendering
the component as a native input element.
([#2456](#2456))

- Fixed typeahead behavior when the composite item element's text
content starts with an empty space.
([#2475](#2475))

- Removed the delay before focusing on the final focus element when a
dialog is closed.
([#2462](#2462))

- Fixed `Dialog` wrongly focusing on the final focus element when a
dialog is closed by clicking on another dialog.
([#2462](#2462))

- Fixed `Disclosure` timing to set the `disclosureElement` state on the
disclosure store.
([#2462](#2462))

- Removed the `hideOnControl` prop from `Hovercard`.
([#2478](#2478))

- Fixed clicking outside a `Dialog` when there's an ancestor element
between the dialog content element and the portal element.
([#2482](#2482))

- Fixed `Popover` with the `updatePosition` prop not moving focus into
the popover when it opens.
([#2482](#2482))

- Updated the `updatePosition` prop type on `Popover` to allow for
returning a `Promise`.
([#2482](#2482))

-   Updated dependencies: `@ariakit/react-core@0.2.4`.

## @ariakit/react-core@0.2.4

### Patch Changes

- The `Checkbox` component now accepts `string[]` as the `value` prop.
This is to conform with the native input prop type. If a string array is
passed, it will be stringified, just like in the native input element.
([#2456](#2456))

- Fixed the `clickOnEnter` prop on `Checkbox` not working when rendering
the component as a native input element.
([#2456](#2456))

- Fixed typeahead behavior when the composite item element's text
content starts with an empty space.
([#2475](#2475))

- Removed the delay before focusing on the final focus element when a
dialog is closed.
([#2462](#2462))

- Fixed `Dialog` wrongly focusing on the final focus element when a
dialog is closed by clicking on another dialog.
([#2462](#2462))

- Fixed `Disclosure` timing to set the `disclosureElement` state on the
disclosure store.
([#2462](#2462))

- Removed the `hideOnControl` prop from `Hovercard`.
([#2478](#2478))

- Fixed clicking outside a `Dialog` when there's an ancestor element
between the dialog content element and the portal element.
([#2482](#2482))

- Fixed `Popover` with the `updatePosition` prop not moving focus into
the popover when it opens.
([#2482](#2482))

- Updated the `updatePosition` prop type on `Popover` to allow for
returning a `Promise`.
([#2482](#2482))

## @ariakit/test@0.1.10

### Patch Changes

- Fixed several actions not considering hidden elements before
dispatching events, which was causing a freeze in JSDOM.
([#2462](#2462))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant