File tree Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 33 v-if =" hasPagination"
44 class =" bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"
55 >
6+ {{ hasPagination}}
67 <p v-if =" !hasData || pagination.total < 1" >
78 {{ translations.no_results_found }}
89 </p >
@@ -229,7 +230,7 @@ const hasLinks = computed(() => {
229230});
230231
231232const hasPagination = computed (() => {
232- return Object .keys (pagination .value ).length > 0 ;
233+ return Object .keys (pagination .value ).length > 0 && pagination . value . total > 1 ;
233234});
234235
235236const pagination = computed (() => {
Original file line number Diff line number Diff line change 2020 :on-filter-change =" changeFilterValue"
2121 >
2222 <TableFilter
23-
23+ v-if = " hasData "
2424 :has-enabled-filters =" queryBuilderProps.hasEnabledFilters"
2525 :filters =" queryBuilderProps.filters"
2626 :on-filter-change =" changeFilterValue"
2727 />
2828 </slot >
2929 </div >
30-
3130 <div
32- v-if =" queryBuilderProps.globalSearch"
3331 class =" flex flex-row order-1 w-full mb-2 sm:w-auto sm:flex-grow sm:order-2 sm:mb-0 "
3432 >
3533 <slot
4038 :on-change =" changeGlobalSearchValue"
4139 >
4240 <TableGlobalSearch
43- v-if =" queryBuilderProps.globalSearch"
41+ v-if =" showGlobalSearch && queryBuilderProps.globalSearch && hasData "
4442 class =" flex-grow"
4543 :label =" queryBuilderProps.globalSearch.label"
4644 :value =" queryBuilderProps.globalSearch.value"
7169 :on-add =" showSearchInput"
7270 >
7371 <TableAddSearchRow
74- v-if =" queryBuilderProps.hasSearchInputs"
72+ v-if =" showGlobalSearch && queryBuilderProps.hasSearchInputs && hasData "
7573 class =" order-3 sm:order-4"
7674 :search-inputs =" queryBuilderProps.searchInputsWithoutGlobal"
7775 :has-search-inputs-without-value =" queryBuilderProps.hasSearchInputsWithoutValue"
173171 </td >
174172 </tr >
175173 </slot >
174+
175+ <tr v-if =" !hasData" >
176+ <td
177+ class =" px-6 py-4 text-sm text-gray-500 whitespace-nowrap text-center"
178+ :colspan =" 100"
179+ >
180+ Geen resultaten gevonden.
181+ </td >
182+ </tr >
176183 </tbody >
177184 </table >
178185 </slot >
@@ -295,6 +302,12 @@ const props = defineProps({
295302 focusBorder: " focus:border-indigo-500"
296303 };
297304 }
305+ },
306+
307+ showGlobalSearch: {
308+ type: [Boolean , String ],
309+ default: true ,
310+ required: false ,
298311 }
299312});
300313
Original file line number Diff line number Diff line change 2727 role =" menu"
2828 aria-orientation =" horizontal"
2929 aria-labelledby =" filter-menu"
30- class =" min-w-max "
30+ class =" min-w-[320px] "
3131 >
3232 <div
3333 v-for =" (filter, key) in filters"
Original file line number Diff line number Diff line change 11{
22 "name" : " @jdanino/inertiajs-tables-laravel-query-builder" ,
3- "version" : " 3.0.0 " ,
3+ "version" : " 3.0.1 " ,
44 "description" : " Inertia.js Front-end Components for Spatie's Laravel Query Builder" ,
55 "private" : false ,
66 "author" : " Pascal Baljet <pascal@protone.media>" ,
You can’t perform that action at this time.
0 commit comments