<template>
  <CTitlePage :ind="ind" :table="table" :showBarSelection="showBarSelection">
    <div class="bi-border-all">
      <div class="q-ma-xs q-gutter-xs">
        <div v-if="showFilterPersonal" class="text-center">
          <q-btn-toggle
            v-model="myrecfiltertoggle"
            push
            glossy
            toggle-color="primary"
            :options="myoptions"
          />
        </div>
        <div v-if="false" class="q-mr-sm">
          <q-input
            v-model="search"
            filled
            type="search"
            debounce="500"
            :hint="t('finder.search_skill')"
            v-on:keyup.enter="doSearch"
          >
            <template v-slot:after>
              <q-btn
                label=""
                color="primary"
                @click="doSearch"
                icon="search"
              ></q-btn>
            </template>
          </q-input>
        </div>

        <CGridTableRec
          v-if="searchList.length > 0"
          :prop_mytable="table"
          prop_mytitle=""
          :prop_mycolumns="col"
          :prop_colkey="prop_colkey"
          :col_title="col_title"
          :col_footer="col_footer"
          :col_tabfooter="col_tabfooter"
          :vertical="costanti.VISUTABLE_LISTA"
          :prop_pagination="mypagination"
          :showType="showType"
          :hint="hint"
          :nodataLabel="noMsgRecord"
          :prop_search="true"
          :finder="true"
          labelElemFind="trovati"
          :choose_visutype="visuType"
          :butt_modif_new="true && !noButtAdd"
          noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
          :arrfilters="arrfilterand"
          :filtercustom="filtercustom"
          :prop_searchList="searchList"
          :defaultnewrec="getdefaultnewrec"
          labelBtnAddRow="NONE"
          :prop_SortFieldsAvailable="mySortFieldsAvailable"
          :labelBtnAddExtra="noButtAdd ? `` : ``"
          :extraparams="extraparams()"
        >
        </CGridTableRec>
      </div>

      <q-page-scroller
        position="bottom-right"
        :scroll-offset="850"
        :offset="[18, 18]"
        style="opacity: 0.3"
      >
        <q-btn fab icon="keyboard_arrow_up" color="accent" />
      </q-page-scroller>
    </div>
  </CTitlePage>
</template>

<script lang="ts" src="./CFinder.ts">
</script>
<style lang="scss" scoped>
@import './CFinder.scss';
</style>
