Availity / availity-reactstrap-validation

Easy to use React validation components compatible for reactstrap.
https://availity.github.io/availity-reactstrap-validation/
MIT License
191 stars 70 forks source link

AvCheckboxGroup - console warning #209

Closed diegodesouza closed 3 years ago

diegodesouza commented 3 years ago

I'm getting this warning, though i feel like I've encountered this issue before.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in AvCheckboxGroup (at QuickView.js:26)
    in form (created by Form)
    in Form (created by AvForm)
    in AvForm (at QuickView.js:25)
    in div (created by CardBody)
    in CardBody (at QuickView.js:18)
    in div (created by Card)
    in Card (at QuickView.js:17)
    in div (created by Transition)
    in Transition (created by Collapse)
    in Collapse (at QuickView.js:15)
    in QuickView (at Roster.js:57)
    in div (at Roster.js:22)
    in div (at Roster.js:21)
    in Roster (at Members.js:62)

QuickView.js

        <AvForm onSubmit={() => savePreferences()}>
                <AvCheckboxGroup name="quickView">
                  <Row>
                    <Col sm="4">
                      <AvCheckbox label="Care Goals" value="Care Goals" />
                      <AvCheckbox label="Allergies" value="Allergies" />
                      <AvCheckbox label="Medications" value="Medications" />
                      <AvCheckbox label="Care Alerts" value="Care Alerts" />
                    </Col>
                    <Col sm="4">
                      <AvCheckbox label="Care Team" value="Care Team" />
                      <AvCheckbox label="Member ID Card" value="Member ID Card" />
                      <AvCheckbox label="Your Instructions" value="Your Instructions" />
                      <AvCheckbox label="Diagnosis" value="Diagnosis" />
                    </Col>
                    <Col sm="4">
                      <AvCheckbox label="Person-centered Service Plan" value="Person-centered Service Plan" />
                      <AvCheckbox label="Your Notes" value="Your Notes" />
                      <AvCheckbox label="Authorization Status Reminders" value="Authorization Status Reminders" />
                      <AvCheckbox label="Claim Status Reminders" value="Claim Status Reminders" />
                    </Col>
                  </Row>
                </AvCheckboxGroup>
                <Button className="float-right" color="primary" type="submit">
                  Save Preferences
                </Button>
           </AvForm
diegodesouza commented 3 years ago

https://stackblitz.com/edit/react-rvtxzv FYI