2
0
mirror of https://github.com/frappe/books.git synced 2024-12-27 04:32:41 +00:00
books/ui/components/controls/Select.vue
thefalconx33 4cbb99ed2d - Base Input Sizing and Placeholder
- $formModal defaults
2019-08-14 13:18:04 +05:30

33 lines
615 B
Vue

<script>
import Base from './Base';
export default {
extends: Base,
methods: {
getInputTag() {
return 'select';
},
getInputAttrs() {
return {
id: this.id,
required: this.docfield.required,
disabled: this.disabled
};
},
getInputChildren(h) {
return this.docfield.options.map(option =>
h('option', {
attrs: {
key: option,
selected: option === this.value,
value: option
},
domProps: {
textContent: option
}
})
);
}
}
};
</script>