jakezatecky / react-dual-listbox

A feature-rich dual listbox for React.
https://jakezatecky.github.io/react-dual-listbox/
MIT License
110 stars 58 forks source link

React dual listbox not working in IE 11 #158

Closed vishalZscaler closed 2 years ago

vishalZscaler commented 2 years ago

Describe the bug I am trying to use simple react dual list box from the package. but i am getting crypto is undefined error inside IE browser

Reproduction steps https://codesandbox.io/s/n37xxln954 I am using exact snippet added in above link.

Expected behavior React dual list box should be loaded inside IE 11.

jakezatecky commented 2 years ago

That crypto error occurs due to the UUID library this component is using to generate unique IDs for the underlying HTML nodes.

I am reluctant to support IE11 due to its legacy status. IE11 implements crypto with the ms prefix, but I do not know whether it supports all of the modern functions the UUID dependency uses.

You can try setting the id property on the tree, which should avoid the window.crypto error. Alternatively, if that does not work, a polyfill for IE11 to support crypto would be necessary.

vishalZscaler commented 2 years ago

@jakezatecky Adding id using uuid library IE11 worked for me . Thank you for your help :) ...