Hi,
I am trying the code for persist columns on my computer. I got the code from this URL:
https://www.telerik.com/kendo-angular-ui/components/knowledge-base/persist-columns-order/
I received the error below when I tried to run the code:
Error: src/app/app.component.ts:52:16 - error TS7053: Element implicitly has an 'any' type because expression of type '"field"' can't be used to index type 'ColumnBase'. Property 'field' does not exist on type 'ColumnBase'. 52 field: col["field"], ~~~~~~~~~~~~
The corresponding code is this:
//the restructured columns containing only the needed properties that will be persisted const restructuredColumns: ColumnFooType[] = orderedColumns.map(col => { const column: ColumnFooType = { field: col["field"], title: col["title"] }; return column; });
It looks like there is no "field" property in ColumnBase. Does anyone know how to fix the error?
Thanks,
Taichi