quasar-factory-lib 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -98,6 +98,6 @@
98
98
  "release": "standard-version"
99
99
  },
100
100
  "type": "module",
101
- "version": "0.1.1",
101
+ "version": "0.1.2",
102
102
  "author": ""
103
103
  }
@@ -527,6 +527,7 @@ export default defineComponent({
527
527
  }, {} as { [key: string]: string })
528
528
  },
529
529
  handleInfiniteScrollTableCompositionAPi () {
530
+ const offSet = this.showAdvancedFilter && this.smallDevice ? document.getElementsByClassName('q-table__control')[0].offsetHeight : 0
530
531
  this.$nextTick(() => {
531
532
  const elemClass = this.smallDevice ? 'q-table__grid-content' : 'q-table__middle scroll'
532
533
  const tableType = this.smallDevice ? 'Grid' : 'Table'
@@ -535,7 +536,7 @@ export default defineComponent({
535
536
  qtableScrollElem.length > 0 ? qtableScrollElem[0] : window
536
537
  const fnAddScroll = (event: Event) => {
537
538
  const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
538
- if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
539
+ if (Math.abs(scrollHeight - clientHeight - scrollTop - offSet) < 1) {
539
540
  console.log(`[${tableType}] You are at the bottom!`, this.totalPage)
540
541
  this.totalPage++
541
542
  }
@@ -35,7 +35,7 @@
35
35
  <q-page-container>
36
36
  <q-page>
37
37
  <Table
38
- ref="table"
38
+ ref="tableRef"
39
39
  :rows="rows"
40
40
  :columns="columns"
41
41
  :visible-columns="tableStoreObj.visiblecolumns"
@@ -90,6 +90,19 @@ import setTableHeight from '../components/Table/utils/setTableHeight'
90
90
  import { tableStore } from '../store/table.js'
91
91
  import { ref, computed, onMounted, watch } from 'vue'
92
92
 
93
+ interface TableInterface {
94
+ toggleSearchVisibility: (obj: object)=> void
95
+ filterInputFocus: () => void
96
+ toogleColumnsSelectorVisibility: () => void
97
+ clearTableSelection: () => void
98
+ handleInfiniteScrollTableCompositionAPi: () => void
99
+ toogleLoading: (val: boolean) => void
100
+ selected: object[] | []
101
+ forceRender: boolean
102
+ enableDragAndDrop: boolean
103
+ totalPage: number
104
+ }
105
+
93
106
  const q = useQuasar()
94
107
  const tableStoreObj = tableStore()
95
108
  const tabletMaxWidth = ref<number> (1100)
@@ -538,7 +551,7 @@ import { ref, computed, onMounted, watch } from 'vue'
538
551
  }
539
552
  ]
540
553
  const showSkeleton = ref<boolean>(false)
541
-
554
+ const tableRef = ref<TableInterface | null>(null)
542
555
  const smallDevice = computed(() => {
543
556
  return q.screen.width <= tabletMaxWidth.value
544
557
  })
@@ -553,6 +566,7 @@ import { ref, computed, onMounted, watch } from 'vue'
553
566
  if (!val) {
554
567
  setTimeout(() => {
555
568
  tableStyle.value = setTableHeight.setTableHeight()
569
+ tableRef.value?.handleInfiniteScrollTableCompositionAPi()
556
570
  }, 500)
557
571
  }
558
572
  }
@@ -31,7 +31,7 @@ const routes: RouteRecordRaw[] = [
31
31
  },
32
32
  {
33
33
  path: '/pdaLayout',
34
- component: () => import('../layouts/PdaLayout.vue')
34
+ component: () => import('../layouts/PdaLayoutVueCompositionApi.vue')
35
35
  }
36
36
  ]
37
37