Skip to content

Creating a Checkbox or Modal emits an error in the console when using Preact #1869

@rbscott

Description

@rbscott

Steps

  1. Using the preact-cli, build a basic project.
  2. npm install --save semantic-ui-react
  3. Add a simple form with a checkbox element anywhere in the project.
    Sample code:
<Form>
    <Form.Checkbox label='Why the errors?'/>
</Form>
  1. The following errors show up in the console log.
    1. Checkbox is missing "defaultChecked" propTypes validation for auto controlled prop "checked".
    2. Checkbox is missing propTypes validation for auto controlled prop "checked".
    3. Checkbox is missing "defaultIndeterminate" propTypes validation for auto controlled prop "indeterminate".
    4. Checkbox is missing propTypes validation for auto controlled prop "indeterminate".

Expected Result

No errors are emitted.

Actual Result

4 errors are emitted.

Version

0.71.1

Testcase

Repository is pretty barebones, but had to make a separate project in order to demonstrate the issue.
https://github.com/rbscott/auto-controlled-error

Notes

I am not sure if Preact is official supported, but it seems to mostly work. If someone points me in the right direction, I could put together a Pull Request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions