|
11 | 11 | el-row |
12 | 12 | el-row(class="popover-row") Maximum rows in table |
13 | 13 | el-row(class="popover-row") |
14 | | - el-input(placeholder="Row Count" @change="getLimitedRows" :disabled="checked" :value="limit" spellcheck="false") rows |
| 14 | + el-input(placeholder="Row Count" @change="getLimitedRows" :disabled="checked" v-model="records.limit" spellcheck="false") rows |
15 | 15 | el-row(class="popover-row") |
16 | 16 | el-checkbox(v-model="checked" @change="getLimitedRows(null)") No Limit |
17 | 17 | el-row(class="popover-close") |
18 | 18 | el-button(size="mini" plain type="primary" @click="visible = false") Close |
19 | 19 | i(class="el-icon-setting settings" slot="reference" title="Table Settings") |
20 | 20 | i( |
21 | 21 | class="el-icon-arrow-left" |
22 | | - :class="{disabled: lastEvaluatedKeyIndex < 1}" |
23 | | - @click="lastEvaluatedKeyIndex >= 1 && getPreviousRecords()" |
| 22 | + :class="{disabled: records.lastEvaluatedKeyIndex < 1}" |
| 23 | + @click="records.lastEvaluatedKeyIndex >= 1 && getPreviousRecords()" |
24 | 24 | ) |
25 | 25 | .pageIndex( |
26 | | - ) {{ lastEvaluatedKeyIndex + 1 }} |
| 26 | + ) {{ records.lastEvaluatedKeyIndex + 1 }} |
27 | 27 | i( |
28 | 28 | class="el-icon-arrow-right" |
29 | | - :class="{disabled: (lastEvaluatedKeyIndex + 1) * limit >= itemCount || evaluatedKeys.length < 1}" |
30 | | - @click="(lastEvaluatedKeyIndex + 1) * limit < itemCount && evaluatedKeys.length > 0 && getNextRecords()" |
| 29 | + :class="{disabled: (records.lastEvaluatedKeyIndex + 1) * records.limit >= itemCount || records.evaluatedKeys.length < 1}" |
| 30 | + @click="(records.lastEvaluatedKeyIndex + 1) * records.limit < itemCount && records.evaluatedKeys.length > 0 && getNextRecords()" |
31 | 31 | ) |
32 | | - .filter-result(v-if="filtered") {{list.length}} matches in {{ limit * lastEvaluatedKeyIndex + 1 }} - {{ (lastEvaluatedKeyIndex + 1) * limit > itemCount ? itemCount : (lastEvaluatedKeyIndex + 1) * limit}} range |
| 32 | + .filter-result(v-if="records.filtered") {{list.length}} matches in {{ records.limit * records.lastEvaluatedKeyIndex + 1 }} - {{ (records.lastEvaluatedKeyIndex + 1) * records.limit > itemCount ? itemCount : (records.lastEvaluatedKeyIndex + 1) * records.limit}} range |
33 | 33 | el-col(:span="6" class="itemCount") {{itemCount ? itemCount : 0}} rows in {{currentTable}} |
34 | 34 | </template> |
35 | 35 |
|
|
46 | 46 | @Prop(Function) private generateMeta: any; |
47 | 47 | @Prop(Function) private refreshTable: any; |
48 | 48 | @Prop(Function) private getNextRecords: any; |
| 49 | + @Prop(Object) private records!: any; |
49 | 50 | @Prop(Function) private getPreviousRecords: any; |
50 | 51 | @Prop(Function) private getLimitedRows: any; |
51 | 52 | @Prop(String) private currentTable!: string; |
52 | 53 | @Prop(Number) private itemCount!: number; |
53 | | - @Prop(Number) private limit!: number; |
54 | | - @Prop(Number) private lastEvaluatedKeyIndex!: number; |
55 | | - @Prop(Array) private evaluatedKeys!: any[]; |
56 | | - @Prop(Boolean) private filtered!: boolean; |
57 | 54 | @Prop(Array) private list!: any[]; |
58 | 55 | } |
59 | 56 | </script> |
|
0 commit comments