Skip to content

AutocompleteWidget: selectionChangeEvent returns partial result for preselected options #297

@Pooya-Oladazimi

Description

@Pooya-Oladazimi

The createCustomTermOption function in the autocomplete widget only sets "iri" and "label" for a custom preselected term. Other metadata, such as "source" are not set.

Expected behavior:

The function needs to set all the metadata provided by the client, not only iri and label.

 value: {
        iri: preselectedElement.iri || "",
        label: preselectedElement.label,
        ontology_name: "",
        type: "",
        short_form: "",
        description: "",
        source: "",
        source_url: "",
      },

Problematic use case: a service portal user wants to import all the ontologies from a backend (like Tib) into the autocomplete upon creating a collection. The current autocomplete does not set the "source" field despite the fact that they exist inside the provided preselected options. As a result, ontologies get stored in the collection without any source.

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