[Custom Components] Multiple component schema info showing more than one component rather than allowing an array of values to be captured.

Open
#788 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript
Domain
frontend

Research direction

Start at the custom component registration and its JSON schema, then reproduce the select component with multiple enabled. Check how the schema's multiple option affects rendering and value validation; done means selected values are captured as one array without rendering multiple component instances.

Written by the indexing model from the issue text.

Description

question scope: community scope: custom components

Hello ,
The "multiple":true is acting like I wanted multiple of that component in one space rather than If this component should allow an array of values to be captured.

Wanting to make a custom multiple select component , When I add in the "multiple":true into the object for the component it gets rendered out as :
image
Yet without it I am getting an error that says the component can not be an array:
image
In the custom component I have the the multiple option in select set to true , so the component returns the items selected as an array.

This is the custom component I am calling :
Json part :
image
Registering it :
image
Note: the comment out schema acts like the "multiple":true, in the Json.

I believe I left something out in registering it but I can not figure out what. I say that because the same behavior is seen when the "multiple":true is added to other components that normally do not return an array.

Dominant language
TypeScript
Stars
706
Forks
493
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from formio/angular

All issues in formio/angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.