Hello,
The new type is enabled in 10.1.0-develop.1 version of the @progress/kendo-react-inputs package.
Regards,
Silviya
Progress Telerik
Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!
Hello Jan,
Thank you for sharing your experience and the workaround you've implemented. I understand the validation errors in the console can be an inconvenience during development.
We are planning to update the onLabel and offLabelprop types to ReactNode to allow more flexibility, in an upcoming version of KendoReact. This change should address the validation errors you're currently encountering and allow you to use icons directly without any issues.
Until the update is released, your approach of disabling TypeScript validation and using the rendered Icon component is a viable solution.
Best Regards,
Silviya
Progress Telerik
Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!
Our team had the same issue and our workaround was to disable TypeScript validation for the onLabel/offLabel and just pass there directly the rendered Icon component.
<Switch onLabel={<Icon ... />} offLabel={<Icon ... />} .../>
This works well as expected. The only issue is we get validation errors in browser console during development.
So, for us, it would be enough if Kendo just changed prop types of onLabel/offLabel from string to ReactNode.