Skip to content

EnumSelect Editor

Description

The EnumSelect Editor provides a UI element for selecting values from a pre-defined list or a vocabulary.

Single or Multiple Select

The EnumSelectEditor allows selecting multiple values by default. To restrict the selection to just one value the sh:maxCount 1 ; triple can be added.

Shacl definition in the RecordType

A sh:property using a dash:EnumSelectEditor can be defined in the RecordType definition as follows:

Single Select based on a pre-defined list

sh:property              [
                            rdfs:label          "Licentie enkel"@nl ;
                            dash:editor         dash:EnumSelectEditor ;
                            sh:datatype         xsd:string ;
                            sh:path             dc:licenceSingle ;
                            sh:group            licence:DisplayGroup ;
                            sh:maxCount         1 ;
                            sh:order            2.0 ;
                            sh:in               ( "CC0" "CC-BY" "CC-BY-SA" "CC-BY-NC" "CC BY-NC-SA" "CC BY-ND" "CC BY-NC-ND" ) ;
] ;

Single select bases on a vocabulary

sh:property              [
                            rdfs:label          "Licentiehouder"@nl ;
                            dash:editor         dash:EnumSelectEditor ;
                            sh:class            skos:Concept ;
                            sh:nodeKind         sh:IRI ;
                            memorix:conceptSchemeIn ( vocabularies:3f30147d-cb4a-4a94-86b4-3c85bdf7ed83 ) ;
                            sh:maxCount         1 ;
                            sh:group            licence:DisplayGroup ;
                            sh:order            4.0 ;
                            sh:path             licence:holder ;
] ;

UI result

The EnumSelectEditor will be rendered as following in the UI:

"EnumSelect Editor in the UI"