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

BUG: Incorrect type definition for StyleManager.addProperty #5135

Closed
2 tasks done
duclet opened this issue May 22, 2023 · 1 comment
Closed
2 tasks done

BUG: Incorrect type definition for StyleManager.addProperty #5135

duclet opened this issue May 22, 2023 · 1 comment

Comments

@duclet
Copy link

duclet commented May 22, 2023

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

All

Reproducible demo link

None

Describe the bug

How to reproduce the bug?

  1. Per the definition here: https://github.com/GrapesJS/grapesjs/blob/dev/src/style_manager/index.ts#L304, you should be providing the options as options for PropertyProps.
  2. However, PropertyProps as defined here: https://github.com/GrapesJS/grapesjs/blob/dev/src/style_manager/model/Property.ts#L9, does not have such a property. This is causing the TS compiler to complain.

What is the expected behavior?
Definition should exists.

What is the current behavior?
Definition is missing.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@artf artf closed this as completed in bfeb9f6 May 27, 2023
pety-dc pushed a commit to d-code-ltd/grapesjs that referenced this issue Aug 14, 2023
@SachinPuthiyoth
Copy link

SachinPuthiyoth commented Jan 12, 2024

Seems like the type definition in StyleManagerConfig.sectors is unchanged :

sectors?: (Omit<SectorProperties, 'properties'> & { properties?: (string | PropertyProps)[] })[];

Shouldn't we be updating this to use PropertyTypes as in :
export type PropertyTypes = PropertyStackProps | PropertySelectProps | PropertyNumberProps;

Opened an issue here - #5613
Shall I raise a PR for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants