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

CheckboxGroup native validation doesn't work properly #6173

Closed
rafighajili opened this issue Apr 9, 2024 · 1 comment
Closed

CheckboxGroup native validation doesn't work properly #6173

rafighajili opened this issue Apr 9, 2024 · 1 comment

Comments

@rafighajili
Copy link

rafighajili commented Apr 9, 2024

Provide a general summary of the issue here

Error message of CheckboxGroup react-aria-component doesn't disappear after it is actually not invalid.

🤔 Expected Behavior?

After submitting form, error message should appear since isRequired is true, but after ticking checkbox, error message should disappear.

😯 Current Behavior

Error message is not disappearing after ticking checkbox. Although it works correct when using useCheckboxGroup and useCheckbox hooks.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

I use starter kit with tailwind provided in RAC documentation with this code below.

"use client";

import { Checkbox, CheckboxGroup } from "#/rac/src/Checkbox";

export default function Page() {
  return (
    <div className="space-y-8 p-32">
      <form>
        <CheckboxGroup label="Favorite sports" isRequired>
          <Checkbox value="soccer">Soccer</Checkbox>
          <Checkbox value="baseball">Baseball</Checkbox>
          <Checkbox value="basketball">Basketball</Checkbox>
        </CheckboxGroup>

        <button>Click me</button>
      </form>
    </div>
  );
}

Version

1.1.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@yihuiliao
Copy link
Member

yihuiliao commented Apr 9, 2024

I think this is a dupe of #5693

EDIT: Closing as a dupe, feel free to reopen if that's not the case

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

No branches or pull requests

2 participants