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

Default value for plugin fields #437

Open
ClaudiaPascualGea opened this issue Nov 27, 2024 · 0 comments
Open

Default value for plugin fields #437

ClaudiaPascualGea opened this issue Nov 27, 2024 · 0 comments

Comments

@ClaudiaPascualGea
Copy link

Describe the bug
The default value for plugin fields, if not edited manually, is always an empty string "". This behavior occurs even if the plugin is expected to handle a different data type, such as numbers.

To Reproduce
Steps to reproduce the behavior:

  1. Create a component with a plugin field (e.g., a maxValue field).
  2. Add the component to a page without entering the plugin field editor.
  3. Save the page.
  4. Inspect the plugin field's value in the JSON output; it will show as an empty string "".

Expected behavior
It should be possible to define the expected data type for a plugin field (e.g., number, boolean, etc.) and set a default value accordingly. For example, if the field is meant to store a number, the default value should be 0 instead of an empty string.

Desktop (please complete the following information):

  • OS: iOS
  • Browser chrome

Additional context
This limitation makes it challenging to handle plugin fields that require a specific data type, as developers have to manually handle empty string values or implement workarounds in the plugin code. Allowing field data types to be explicitly defined would streamline workflows and ensure data consistency across components.

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

1 participant