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

未關閉
#788 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
angular, typescript
領域
frontend

研究方向

從自訂元件註冊及其 JSON schema 開始,接著重現啟用 multiple 的 select 元件。檢查 schema 的 multiple 選項如何影響渲染和值驗證;完成的標準是:選取的值會被擷取為單一陣列,而不會渲染多個元件實例。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
706
分支
493
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

formio/angular 的其他 Issue

查看 formio/angular 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。