KendoReact Breadcrumb - issue with Typescript definition ?!?!

1 Answer 136 Views
General Discussions
mo2011ti
Top achievements
Rank 1
mo2011ti asked on 17 Nov 2021, 06:07 AM

Hi Telerik Team,

when using the simple example below, there few warnings/errors apear in console

can you check if this is an issue with Typescript definition or some bug ?

 
const items: DataModel[] = [
    {
        id: "home",
        text: "Home",
        iconClass: "k-i-home",
    },
    {
        id: "profile",
        text: "User Profile",
    },

];

 

<Breadcrumb data={items}/>

 

 

Warning: Failed prop type: KendoReactBreadcrumb: prop type `breadcrumbOrderedList` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.

react_devtools_backend.js:2540 Warning: Failed prop type: KendoReactBreadcrumb: prop type `breadcrumbListItem` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.

Warning: Failed prop type: KendoReactBreadcrumb: prop type `breadcrumbDelimiter` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.

react_devtools_backend.js:2540 Warning: Failed prop type: KendoReactBreadcrumb: prop type `breadcrumbLink` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 17 Nov 2021, 06:18 AM

Hello,

Thank you for the code.

I inspected it and noticed that all of these are propTypes warnings, not TypeScript errors, and should not affect building the application.

Still, I made different tests locally, and none of these errors occurs on my end. Is it possible to share an example reproducing the errors and I will be happy to take a look at it

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

mo2011ti
Top achievements
Rank 1
commented on 17 Nov 2021, 06:30 AM

Hi Stefan,

Thanks for the quick response !

looking into this propTypes warnings

I dont have  'prop-types' installed in my package.json
https://www.npmjs.com/package/prop-types

should i install it ?
is it a dependency of the KendoReact library ?
if so, is it mention in the documentation that it should be installed as dependency ?

Thanks,

 

Stefan
Telerik team
commented on 17 Nov 2021, 08:40 AM

Hello,

This package is used internally and it is installed automatically when installing our packages.

Please advise which is the user version of the component that is used, as this could have been fixed in the latest one?

mo2011ti
Top achievements
Rank 1
commented on 17 Nov 2021, 08:59 AM

Thanks Stefan !

Indeed, it solves the issue:

$ npm add --save prop-types

$ npm add --save-dev @types/prop-types

 

Tags
General Discussions
Asked by
mo2011ti
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or