Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement][Spreadsheet] Expose activeSheet().values() method #2123

Open
WissamProgress opened this issue Mar 25, 2024 · 0 comments
Open
Labels
Enhancement New feature of an existing functionality or an improvement of an existing functionality KendoReact pkg:Spreadsheet

Comments

@WissamProgress
Copy link
Collaborator

WissamProgress commented Mar 25, 2024

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 WissamProgress added Enhancement New feature of an existing functionality or an improvement of an existing functionality pkg:Spreadsheet KendoReact labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature of an existing functionality or an improvement of an existing functionality KendoReact pkg:Spreadsheet
Projects
None yet
Development

No branches or pull requests

1 participant