WIP - trying to get select2 wired up for importer
This commit is contained in:
parent
8009ee79db
commit
5c97e45d00
2 changed files with 16 additions and 23 deletions
|
@ -10,7 +10,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-7 col-xs-12">
|
<div class="col-md-7 col-xs-12">
|
||||||
{{ Form::select('importType', $importTypes, 0 /* FIXME whats' the old value? */, ['placeholder' => '', 'wire:model' => 'importType', 'wire:change' => 'changeTypes']) }}
|
<span wire:ignore>
|
||||||
|
{{ Form::select('importType', $importTypes, 0 /* FIXME whats' the old value? */, ['class' => 'livewire-select2', 'placeholder' => '', 'data-livewire-model' => 'importType']) }}
|
||||||
|
</span>
|
||||||
{{-- <select2 :options="options.importTypes" v-model="options.importType" required> --}}
|
{{-- <select2 :options="options.importTypes" v-model="options.importType" required> --}}
|
||||||
{{-- <option disabled value="0"></option> --}}
|
{{-- <option disabled value="0"></option> --}}
|
||||||
{{-- </select2> --}}
|
{{-- </select2> --}}
|
||||||
|
@ -205,3 +207,15 @@
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{{-- </template> --}}
|
{{-- </template> --}}
|
||||||
|
<script>
|
||||||
|
console.warn("Doodie doodie butt farts")
|
||||||
|
$('.livewire-select2').select2();
|
||||||
|
console.warn("Select2 has been activated within the livewire context (maybe?)")
|
||||||
|
$('.livewire-select2').on('select2:select', function (event) {
|
||||||
|
console.log("select2 selected!!!!!!!!!!!")
|
||||||
|
})
|
||||||
|
$('.livewire-select2').on('change',function (event) {
|
||||||
|
console.warn("Original target is: "+event.target)
|
||||||
|
// find the data-livewire-model thing?
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -2,7 +2,7 @@
|
||||||
{{-- <importer inline-template v-cloak> --}} {{-- like, this, here, that's a literal Vue directive --}}
|
{{-- <importer inline-template v-cloak> --}} {{-- like, this, here, that's a literal Vue directive --}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{-- <alert v-show="alert.visible" :alert-type="alert.type" v-on:hide="alert.visible = false">@{{ alert.message }}</alert> --}}
|
{{-- <alert v-show="alert.visible" :alert-type="alert.type" v-on:hide="alert.visible = false">@{{ alert.message }}</alert> --}}
|
||||||
<template>
|
<template> {{-- this is going to take some porting :/ --}}
|
||||||
<div class="box" v-if="errors">
|
<div class="box" v-if="errors">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
|
@ -45,27 +45,6 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<script>
|
|
||||||
fixme = {
|
|
||||||
/*
|
|
||||||
* The component's data.
|
|
||||||
*/
|
|
||||||
props: ['alertType', 'title'],
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
alertClassName() {
|
|
||||||
return 'alert-' + this.alertType;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
hideEvent() {
|
|
||||||
this.$emit('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
{{-- errors thing that's built-in maybe? --}}
|
{{-- errors thing that's built-in maybe? --}}
|
||||||
{{-- <errors :errors="importErrors"></errors> --}}
|
{{-- <errors :errors="importErrors"></errors> --}}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue