Skip to content

This is good stuff, just needs a small fix #4

Open
@fermmm

Description

@fermmm

This is a very simple package and the code quality is good, also works great after applying a fix.

Problems:

  • Sometimes onChange is not executed
  • onChange is not executed when entering the page

These are small problems and easy to fix.

Solution:

Change line 19:
const [lastValue, setLastValue] = useState<boolean>(false);
for this:
const [lastValue, setLastValue] = useState<boolean>(null);

Remove line 29:
setLastValue(false);

The package is only 1 file so if the maintainer doesn't fix it anyone can just copy the code into a file with no problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions