kendo-react
kendo-react copied to clipboard
[Enhancement][Spreadsheet] Expose `activeSheet().values()` method
I'm submitting a...
- Suggestion for improvement
Current behavior
Using the values method through ref.current.activeSheet().values() causes a type error because it is not exported.
This function is available in Kendo UI for jQuery - https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/values
Minimal reproduction of the problem with instructions
In a typescript project using VS Code, add the following code where ref is set to the ref prop of the Spreadsheet:
const ref = React.useRef<SpreadsheetHandle | null>(null);
React.useEffect(() => {
const sheet = ref.current?.activeSheet();
if (sheet) {
console.log(sheet.range("A2:C3").values());
}
}, []);
Workaround
Add type any to the activeSheet:
const sheet: any = ref.current?.activeSheet();
if (sheet) {
console.log(sheet.range("A1:C3").values());
}
Reported in Ticket ID: 1645748