Commit 0900a92a authored by Tim Zallmann's avatar Tim Zallmann

Direct Import of Select2 on the add license form

parent 50c5efba
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import select2 from 'select2/select2';
import { KNOWN_LICENSES } from '../constants'; import { KNOWN_LICENSES } from '../constants';
export default { export default {
...@@ -17,8 +18,6 @@ export default { ...@@ -17,8 +18,6 @@ export default {
}, },
}, },
mounted() { mounted() {
import(/* webpackChunkName: 'select2' */ 'select2/select2')
.then(() => {
$(this.$refs.dropdownInput) $(this.$refs.dropdownInput)
.val(this.value) .val(this.value)
.select2({ .select2({
...@@ -31,8 +30,6 @@ export default { ...@@ -31,8 +30,6 @@ export default {
.on('change', e => { .on('change', e => {
this.$emit('input', e.target.value); this.$emit('input', e.target.value);
}); });
})
.catch(() => {});
}, },
beforeDestroy() { beforeDestroy() {
$(this.$refs.dropdownInput).select2('destroy'); $(this.$refs.dropdownInput).select2('destroy');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment