IgniteUI / igniteui-react-wrappers

Ignite UI components for React
https://igniteui.github.io/igniteui-react-wrappers/
MIT License
168 stars 15 forks source link

Update samples with latest igniteui-full package #126

Open dkamburov opened 2 years ago

dkamburov commented 2 years ago

Issue 1:

It seems that there are errors with the latest version of igniteui-full and react 17.

For example running the ig-grid sample would throw the following error:

TypeError: Cannot assign to read only property 'dataSource' of object '#<Object>'

Issue 2:

Furthermore, the standalone samples are referring to non production files. Take a look at the igGrid.html, for example. It has the following script references:

<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/util/ignite-react.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/components/igGrid.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/components/igTextEditor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/components/igNumericEditor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/components/igDialog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/components/igButton.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/props/igGrid.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/props/igTextEditor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/props/igNumericEditor.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/props/igDialog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/IgniteUI/igniteui-react-wrappers/src/props/igButton.js"></script>

After building the react wrappers library, the contents of all props-files are merged into the igniteui-react.js file, so they should not be referred to directly.

https://github.com/IgniteUI/igniteui-react-wrappers/blob/000b452abbad626e09c7dd95a23550389f7e3a1e/package.json#L17-L18

Besides that, the ignite-react.js file does not exist when creating a release build. In order to completely avoid any further build issues, refer to #124.

This is regressed after v "21.1.11", as with it the samples work and are only throwing Warning: Failed prop type: Invalid prop value of type string supplied to <<anonymous>>, expected object.

For comparison, under 21.1.25 / 21.2.9 the errors are: Warning: Failed prop type: Invalid prop value of type string supplied to <<anonymous>>, expected object. infragistics.lob.js:22016 --> Uncaught TypeError: Cannot assign to read only property 'dataSource' of object '#' igniteui-react.js:75 --> Uncaught TypeError: $(...)[component.widgetName] is not a function