Indeterminate checkbox in React JSX

前端 未结 7 1655
旧时难觅i
旧时难觅i 2021-01-01 17:00

How do I render an indeterminate checkbox via JSX?

Here\'s what I\'ve tried:

function ICB({what}) {
  return 

        
7条回答
  •  猫巷女王i
    2021-01-01 17:31

    An alternative would be to use a ref attribute with a callback to set the property on the DOM node. For example:

    render: function() {
      return (
        
      )
    }
    

提交回复
热议问题