Getting Warning When Specifying Grid Wrapper columns.sortable Configuration

1 Answer 136 Views
Grid wrapper
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
Alex asked on 23 Aug 2021, 06:01 PM

I am using a custom comparison function for a wrapper grid column as follows:

<kendo-grid-column :field="'OrderID'" :sortable="{ compare: myComparisonFunction }"></kendo-grid-column>

This works, but I get the following warning in the console: [Vue warn]: Invalid prop: type check failed for prop "sortable". Expected Boolean, got Object

Here is a full example: https://stackblitz.com/edit/chqmrq?file=src/main.vue

What should I do to get rid of the console warning?

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 24 Aug 2021, 06:21 AM

Hi Alex,

The sortable property accepts only boolean values and this is why you are getting the shared warning. The property you need to pass the myComparisonFunction is sortable-compare.

Here is an edited version of the project you sent me that demonstrates the usage of the mentioned property.

Regards,
Petar
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/.

Alex
Top achievements
Rank 1
Veteran
Iron
Iron
commented on 24 Aug 2021, 12:21 PM | edited

Thank you. Does every property of type object as shown in the API documentation follow this format for Kendo Vue? e.g. if the API documentation uses property.field, Vue uses property-field/propertyField.
Petar
Telerik team
commented on 25 Aug 2021, 07:28 AM

Hi, Alex. In general, the answer to your questions is "yes". This format is valid for the Wrapper components. However, I would recommend checking the API documentation of the component that you use. In this documentation, you will find the exact property you should use to implement the needed functionality. 

Tags
Grid wrapper
Asked by
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Petar
Telerik team
Share this question
or