Angular JSON Форма выбора схемы с возможностью ввода пользовательского значения - PullRequest
0 голосов
/ 07 апреля 2020
Hello all. 

I am working with Angular JSON SCHEMA FORM v2, I was wondering if we can have a select element with the option of entering custom values as well. Is it possible?

With respect to HTML, we can have it with the combination of datalist and input field. like wise can we have it in angular json schema forms with schema and layouts. 

Ниже приведены схема и макет формы. Я хотел, чтобы атрибут select и select, и тип ввода (пользовательское значение) Choose - это атрибут с параметрами, определенными в titleMap.

  "schema": {
   "type":"object",
   "required":[
      "choose"
   ],
   "properties":{
      "choose":{
         "type":"string",
         "title":"Choose the Software Instance",
         "titleMap":[
            {
               "name":"ABC",
               "value":"abc"
            },
            {
               "name":"xyz",
               "value":"XYZ"
            }
         ]
      }
   }
}

"form": [
   {
      "key":"choose",
      "type":"select",
      "htmlClass":"row row-spacing",
      "fieldHtmlClass":"col-lg-8 input-json-form",
      "labelHtmlClass":"col-lg-4 label-json-form required-field"
   }
]

Thank you
...