Search listado por defecto muestra 25 y cleanup

This commit is contained in:
2023-12-20 12:04:06 -03:00
parent 6f772a56b8
commit 06d5327934

View File

@ -224,6 +224,7 @@
parent.append(table)
this.table = new DataTable(table, {
pageLength: 25,
order: [
[0, 'asc'],
[2, 'asc']
@ -307,6 +308,16 @@
this.id = id
this.get().results()
$('#tipo').dropdown().dropdown('set selected', '*')
@if (trim($post) !== '')
$("[name='query']").val('{{$post}}')
@elseif (trim($query) !== '')
$("[name='query']").val('{{$query}}')
@endif
@if (trim($tipo) !== '')
$('#tipo').dropdown('set selected', '{{$tipo}}')
@endif
$('#search_form').submit(event => {
event.preventDefault()
this.get().results()
@ -316,15 +327,6 @@
}
}
$(document).ready(() => {
$('#tipo').dropdown().dropdown('set selected', '*')
@if (trim($post) !== '')
$("[name='query']").val('{{$post}}')
@elseif (trim($query) !== '')
$("[name='query']").val('{{$query}}')
@endif
@if (trim($tipo) !== '')
$('#tipo').dropdown('set selected', '{{$tipo}}')
@endif
results.setup('#results')
})
</script>