kendo-react icon indicating copy to clipboard operation
kendo-react copied to clipboard

[Enhancement][Spreadsheet] Expose `activeSheet().values()` method

Open WissamProgress opened this issue 1 year ago • 0 comments

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.

image

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

WissamProgress avatar Mar 25 '24 11:03 WissamProgress