Simplify set post or query

This commit is contained in:
Juan Pablo Vial
2024-01-23 20:41:52 -03:00
parent ac6c5b7d3d
commit 62edca5335

View File

@ -309,17 +309,23 @@
}
}
},
set: function() {
return {
query: value => {
$("[name='query']").val(value)
this.get().results()
}
}
},
setup: function(id) {
this.id = id
this.get().results()
$('#tipo').dropdown().dropdown('set selected', '*')
@if (trim($post) !== '')
$("[name='query']").val('{!! $post !!}')
this.get().results()
this.set().query('{!! $post !!}')
@elseif (trim($query) !== '')
$("[name='query']").val('{!! $query !!}')
this.get().results()
this.set().query('{!! $query !!}')
@endif
@if (trim($tipo) !== '')
$('#tipo').dropdown('set selected', '{{$tipo}}')