UNPKG

@aujsf/bootstrap-theme

Version:
35 lines (24 loc) 949 B
<template> <require from="@aujsf/bootstrap-theme/aujsf-bs-label.html"></require> <let enum-labels.bind="uiSchema['ui:enum-labels'] || {}"></let> <div class="form-group"> <aujsf-bs-label id.bind="id" title.bind="title" required.bind="required"> </aujsf-bs-label> <select id.bind="id" value.bind="value" disabled.bind="readonly" class="custom-select ${hasErrors ? 'is-invalid' : value !== undefined ? 'is-valid' : ''}"> <option if.bind="placeholder" model.bind="undefined" selected> ${placeholder} </option> <option repeat.for="option of schema.enum" model.bind="option"> ${enumLabels[option] || option} </option> </select> <small class="form-text text-muted" if.bind="description">${description}</small> <div class="invalid-feedback" repeat.for="error of errorMessages"> ${error} </div> </div> </template>