quasar-factory-lib 0.0.51 → 0.0.52
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/dist/components/Table/utils/setTableHeight.d.ts +1 -0
- package/dist/pages/TablePage.vue.d.ts +1 -1
- package/dist/quasar-factory-lib.js +11 -1
- package/dist/quasar-factory-lib.umd.cjs +9 -9
- package/package.json +1 -1
- package/src/components/Table/components/TableSlotGrid.vue +1 -1
- package/src/components/Table/utils/setTableHeight.ts +13 -0
- package/src/pages/TablePage.vue +12 -8
package/package.json
CHANGED
|
@@ -21,6 +21,19 @@ const utils = {
|
|
|
21
21
|
}
|
|
22
22
|
const n = Number(footerHeightHeight) + Number(headerHeight)
|
|
23
23
|
return `height:${window.innerHeight - n}px`
|
|
24
|
+
},
|
|
25
|
+
setModalTableHeight (elementId: string):string {
|
|
26
|
+
const topCard = document.getElementById(elementId)
|
|
27
|
+
let topCardHeight = ''
|
|
28
|
+
if (topCard) {
|
|
29
|
+
const computedHeight = window.getComputedStyle(topCard).height
|
|
30
|
+
|
|
31
|
+
if (computedHeight !== 'auto') {
|
|
32
|
+
topCardHeight = computedHeight.replace('px', '')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const n = Number(topCardHeight)
|
|
36
|
+
return `height:${window.innerHeight - n}px`
|
|
24
37
|
}
|
|
25
38
|
}
|
|
26
39
|
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<div
|
|
8
8
|
class="full-width"
|
|
9
9
|
>
|
|
10
|
-
|
|
11
|
-
<q-btn @click="store.prepared = !store.prepared">Click</q-btn>
|
|
10
|
+
{{ store.prepared }}
|
|
11
|
+
<q-btn @click="store.prepared = !store.prepared">Click</q-btn>
|
|
12
12
|
<Table
|
|
13
13
|
ref="table"
|
|
14
14
|
:rows="rows"
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
:show-skeleton="false"
|
|
21
21
|
:selection-type="'multiple'"
|
|
22
22
|
:getCellClass="getCellClass"
|
|
23
|
+
:filterComputedOptions="{ preparedQuantity: store.prepared}"
|
|
24
|
+
:additional-sort-conditions="additionalSortConditions"
|
|
25
|
+
:additional-filter-conditions="additionalFilterConditions"
|
|
23
26
|
@on-select-visible-columns="saveSelectedColumns"
|
|
24
27
|
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
25
28
|
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
@@ -378,16 +381,17 @@ export default {
|
|
|
378
381
|
},
|
|
379
382
|
additionalFilterConditions (rows_: object[] | [], filteredRowsParam_: object[] | []) {
|
|
380
383
|
console.log('additional filter conditions')
|
|
381
|
-
|
|
384
|
+
const rowsToReturn = []
|
|
385
|
+
const filteredOrAllRows = filteredRowsParam_.length > 0 ? filteredRowsParam_: rows_
|
|
382
386
|
if (this.store.prepared) {
|
|
383
|
-
for (let i = 0; i <
|
|
384
|
-
if (
|
|
385
|
-
|
|
387
|
+
for (let i = 0; i < filteredOrAllRows.length; i++) {
|
|
388
|
+
if (filteredOrAllRows[i].sodium >= 300) {
|
|
389
|
+
rowsToReturn.push(filteredOrAllRows[i])
|
|
386
390
|
}
|
|
387
391
|
}
|
|
388
|
-
return
|
|
392
|
+
return rowsToReturn
|
|
389
393
|
} else {
|
|
390
|
-
return
|
|
394
|
+
return filteredRowsParam_
|
|
391
395
|
}
|
|
392
396
|
},
|
|
393
397
|
additionalSortConditions (filteredRowsData: object[] | [], rows: object[] | []) {
|