question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

validateOnMount option does not work for blueprintjs checkbox(es)

See original GitHub issue

Scope: BlueprintJS Component Mapper / Checkbox

validateOnMount does not work for checkbox(es) and React throws an error.

Warning: React does not recognize the validateOnMount prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase validateonmount instead. If you accidentally passed it from a parent component, remove it from the DOM element.

https://stackblitz.com/edit/tksltp?file=schema.js

Schema in question:

export default {
  fields: [
    {
      component: 'checkbox',
      label: 'Checkbox',
      name: 'checkbox',
      validateOnMount: true,
      options: [
        {
          label: 'Dog',
          value: '1',
        },
        {
          label: 'Cats',
          value: '2',
        },
        {
          label: 'Hamsters',
          value: '3',
        },
      ],
    },
  ],
};

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Checkbox component does not work in controlled mode #2370
Bug report blueprintjs/core: 2.1.1, Browser: Google Chrome | 65.0.3325.181 ... Checkbox component does not work in controlled mode #2370.
Read more >
BlueprintJS - Data driven forms
Blueprint mapper provides an option to validate a field when the component is mounted. Just set validateOnMount to true . ... This field...
Read more >
ReactJS Blueprint Checkbox Component - GeeksforGeeks
BlueprintJS is a React-based UI toolkit for the web. ... whether this checkbox is initially indeterminate (uncontrolled mode) or not.
Read more >
Checkbox with Initial Value in Formik Not Toggling, Need to ...
So now my initial value for the checkboxes doesn't work anymore, although I can toggle now. <Form.Control type="checkbox" id="checkCertAgreement ...
Read more >
event.preventDefault does not always prevent what you might ...
preventDefault and React checkboxes. ... focuses mainly on the preventDefault function I'll spare you the markup I wrote, but don't worry if ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found