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

Formulas plugin "sheetName" property throwing error in React with TypeScript #10023

Closed
adrianszymanski89 opened this issue Oct 14, 2022 · 5 comments · Fixed by #10653
Closed
Assignees
Labels
bug Formulas Plugin React Issues regarding the @handsontable/react wrapper. Reported TypeScript

Comments

@adrianszymanski89
Copy link
Contributor

Description

If we try to set the sheetName property in the formulas plugin configuration, it throws an error:

TS2322: Type '{ engine: HyperFormula; sheetName: string; }' is not assignable to type 'DetailedSettings'.   Object literal may only specify known properties, and 'sheetName' does not exist in type 'DetailedSettings'.

This issue is present only in projects using React and TypeScript.

Steps to reproduce

  1. Open provided demo
  2. See the error

Demo

https://codesandbox.io/s/cocky-gauss-q72gz6?file=/src/hottable.tsx

Your environment

  • Handsontable version: 12.1.3
  • Browser name and version: Google Chrome 106
  • Operating system: macOS Monterey 12.6
@adrianszymanski89 adrianszymanski89 added TypeScript Formulas Plugin React Issues regarding the @handsontable/react wrapper. labels Oct 14, 2022
@adrianszymanski89 adrianszymanski89 changed the title Formulas plugin "sheetName" property throwing error In React with TypeScript Formulas plugin "sheetName" property throwing error in React with TypeScript Oct 14, 2022
@jamshaidbutt055
Copy link

Inform Forum

@sequba
Copy link
Contributor

sequba commented Nov 15, 2022

A workaround for this issue: use any to suppress type checking:

  const formulasEngineConfig: any = {
    engine: hyperformulaInstance,
    sheetName: "hello"
  };

https://codesandbox.io/s/muddy-shadow-nmzm94?file=/src/hottable.tsx:690-789

@wave-light
Copy link

wave-light commented Dec 1, 2023

This issue is still present, using:

  • handsontable@13.1.0
  • @handsontable/react@13.1.0
  • hyperformula@2.6.0

The fix of setting type to any works, but we need a proper fix to the types here.

@Maxth47
Copy link

Maxth47 commented Jan 3, 2024

I facing the same problem in the version 14.0.0

@AMBudnik
Copy link
Contributor

AMBudnik commented Jan 4, 2024

Hi @thanhlevu this issue should be fixed with the upcoming release (around 15 - 17 Jan).

I will update this thread upon release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Formulas Plugin React Issues regarding the @handsontable/react wrapper. Reported TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants