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

Fixed saving of empty custom metdata #751

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

Corepex
Copy link
Contributor

@Corepex Corepex commented Nov 28, 2024

blocked by: pimcore/studio-backend-bundle#593

Changes in this pull request

  • removed .metadata prefix,
  • fixed saving of empty entries for checkbox, input and textarea

Resolves #615

Additional info

This pull request includes a significant update to the assets/js/src/core/modules/asset/editor/toolbar/toolbar.tsx file, focusing on the handling of custom metadata within the Toolbar component. The changes ensure proper formatting and default values for different types of metadata.

Key changes include:

  • Metadata Type Handling:

    • Added logic to remove the 'metadata.' prefix from the type property of metadataApi if it exists.
  • Default Data Values:

    • Set default values for metadataApi.data when it is null, assigning an empty string for 'input' and 'textarea' types, and false for 'checkbox' types.

@Corepex Corepex self-assigned this Nov 28, 2024
Copy link

sonarcloud bot commented Nov 28, 2024

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

Successfully merging this pull request may close these issues.

[Bug] empty custom metadata fields get deleted when saving
1 participant