Skip to content

Schema changes aren't handled correctly #395

Closed
@aantipov

Description

@aantipov

I have 2 schemes and 1 form definition:
Schema 1:

{   
    "type": "object",
    "required" : ["name"],
    "properties": {
        "name": { "type": "string", "title": "First Name"}
    }
}

Schema 2:

{   
    "type": "object",
    "required" : ["name"],
    "properties": {
        "name": { "type": "string", "title": "My First Name",  "enum": ['Alex', 'Peter'],}
    }
}

Form:

[ 
    {"key": 'name', "htmlClass": "col-sm-12"}
]

Schema 1 is default, so default field type is text.
When I switch to Schema 2 the field aren't changed to select, it remains the same input[type=text].

I've made some research and found out, that

  1. The field's scope has property schemaForm and its value has 2 properties form and schema
  2. schema's value corresponds to selected schema 2. That is OK.
  3. form's value contains info about the field, and this field's info contains info about the schema. But this schema info doesn't corresponds to current Schema 2, it corresponds to previous Schema 1. This is NOT OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions