Closed wnvko closed 7 months ago
@wnvko Do you have a sample you can share? The error sounds like maybe some module, maybe for the igrButton, was not registered. There are similar samples here: https://www.infragistics.com/products/ignite-ui-react/react/components/notifications/dialog#ignite-ui-for-react-dialog-example In which the button is added as expected.
@MayaKirova yes sure, here is a sample showing this issue. DialogIssue.zip
@wnvko Thanks for the sample. The issue seems to be with the button's content similar to the one I mentioned here: https://github.com/IgniteUI/igniteui-react/issues/60#issuecomment-2036511594
The react wrappers don't allow setting text content directly, so you'll need to wrap it and set a key. For example:
<IgrButton variant="flat" size="large" clicked={() => dialog?.current.toggle()} key={uuid()}><span key="Cancel">Cancel</span></IgrButton>
<IgrButton variant="flat" size="large" clicked={() => dialog?.current.toggle()} key={uuid()}><span key="OK">OK</span></IgrButton>
Description
Not able to add button to any of dialog's component slots.
Steps to reproduce
I have this dialog:
Result
When I run the application an error is thrown Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Expected result
Dialog should allow addition of button to any of its slots.
Attachments
Here is full error log: