palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.75k stars 2.18k forks source link

[Checkbox] using non-callback inputRef fails with "Cannot add property indeterminate, object is not extensible" at runtime #4651

Closed vladimir-djokic closed 3 years ago

vladimir-djokic commented 3 years ago

Environment

Code Sandbox

https://codesandbox.io/s/blueprint-sandbox-forked-qhg7b

Actual behavior

If non-callback ref is used for inputRef, "Cannot add property indeterminate, object is not extensible" is thrown.

Possible solution (workaround)

Use callback ref.

adidahiya commented 3 years ago

Your sandbox seems to work fine with the latest version of Blueprint core v3.43.0: https://codesandbox.io/s/blueprint-sandbox-forked-es5qi?file=/src/index.tsx

vladimir-djokic commented 3 years ago

Yes, I can confirm that the issue is not present in 3.43.0 and 3.44.0, but present in earlier versions.

adidahiya commented 3 years ago

Indeed, I believe it was fixed by https://github.com/palantir/blueprint/pull/4612, released in 3.43.0