Skip to content

Delete last item of array instead of current one #732

Closed
@MGouaillier4CT

Description

@MGouaillier4CT

Hello.

I have this problem using angular schemaform.

When i want to delete an arrray field with a custom field in it, it deletes the last implemented array field instead of the current one

See exemple here : http://recordit.co/DwUSJHCRQ6

For your information this bug only occurs when i'm using a custom field type, i have another array with only number types, and this bug doesn't appear.

InputSchema :

"base_network_sections_not_to_be_cut": {
                                "title": "Sections de route a ne pas couper",
                                "type": "array",
                                "description": "{object_type:\"road\", values:\"objectid\"}",
                                "items": {
                                    "type": "string"
                                }
                            },

formSchema :

{
    "type": "fieldset",
    "title": "Section du réseau de base à ne pas couper",
    "htmlClass": "form-group form-border",
    "items": [
      {
        "type": "section",
        "htmlClass": "wrapper",
        "items": [
          {
            "type": "section",
            "htmlClass": "row array-field",
            "items": [
              {
                "key": "base_network_sections_not_to_be_cut",
                "title": "Section du réseau de base à ne pas couper par les barrières géographiques",
                "description": "",
                "htmlClass": "array-button",
                "add": "Ajouter un city object",
                "style": {
                  "add": "btn-info"
                },
                "items": [
                  {
                    "key": "base_network_sections_not_to_be_cut[]",
                    "type": "cityobjectpicker"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },

I'm not sure where the problem comes from. Have you already seen a bug like this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions