Explorar o código

feat: add no-option template to DefaultSelect in UserTypeSelect and AddEditContractDialog components

alvesantos hai 2 semanas
pai
achega
f628a3bd0a

+ 9 - 1
src/components/selects/UserTypeSelect.vue

@@ -11,7 +11,15 @@
     :placeholder
     :label
     @filter="filterFn"
-  />
+  >
+    <template #no-option>
+      <q-item>
+        <q-item-section class="text-grey">
+          {{ $t("http.errors.no_records_found") }}
+        </q-item-section>
+      </q-item>
+    </template>
+  </DefaultSelect>
 </template>
 
 <script setup>

+ 9 - 1
src/pages/students/components/AddEditContractDialog.vue

@@ -61,7 +61,15 @@
                         :options="filteredStudents"
                         :rules="[inputRules.required]"
                         @filter="filterStudents"
-                      />
+                      >
+                        <template #no-option>
+                          <q-item>
+                            <q-item-section class="text-grey">
+                              {{ $t("http.errors.no_records_found") }}
+                            </q-item-section>
+                          </q-item>
+                        </template>
+                      </DefaultSelect>
 
                       <div v-if="canAddStudents" class="col-auto">
                         <q-btn