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

Multivalue number in Content Metadata Card is not working #8919

Closed
werdy77 opened this issue Sep 20, 2023 · 0 comments · Fixed by #9358
Closed

Multivalue number in Content Metadata Card is not working #8919

werdy77 opened this issue Sep 20, 2023 · 0 comments · Fixed by #9358
Assignees
Labels

Comments

@werdy77
Copy link

werdy77 commented Sep 20, 2023

Type of issue:

  • New feature request
  • Bug
  • Support request
  • Documentation

Current behaviour:
Metadata with multivalue number is not working, number is not visible in the input field and an error is displayed in the console:

core.mjs:9157 ERROR Error: NG02100: InvalidPipeArgument: '1 is not a number' for pipe 'DecimalPipe'
    at invalidPipeArgumentError (common.mjs:4134:12)
    at DecimalPipe.transform (common.mjs:4934:19)
    at DecimalNumberPipe.transform (adf-core.mjs:5539:28)
    at adf-core.mjs:14877:91
    at Array.reduce (<anonymous>)
    at CardViewFloatItemModel.applyPipes (adf-core.mjs:14877:39)
    at get displayValue [as displayValue] (adf-core.mjs:14910:21)
    at adf-content-services.mjs:19529:89
    at Array.filter (<anonymous>)
    at ContentMetadataComponent.showGroup (adf-content-services.mjs:19529:45)

Expected behavior:
Number should be visible in the input field without console error.

Steps to reproduce the issue:

  • Create an aspect with multivalue number metadata.
<aspect name="demo:aspect">
  <title>demo aspect</title>
  <properties>
    <property name="demo:amount">
      <title>Amount</title>
      <type>d:double</type>
      <multiple>true</multiple>
    </property>
  </properties>
</aspect>
  • Add aspect to content-metadata/presets section in app.config.json to show its metadata in Metadata Card.
  • Add aspect to a document.
  • Open this document and view its metadata in the ADF application.
  • Type a number in the input field, which belongs to the metadata with multivalue number.

Component name and version:
adf-content-metadata-card, 6.3

Browser and version:
Brave Version 1.57.64 Chromium: 116.0.5845.188 (Official Build) (64-bit)

Node version (for build issues):
18.11.11

Angular version:
14.2.12

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

Successfully merging a pull request may close this issue.

3 participants