Skip to content

Commit 7807029

Browse files
committed
Fixed input data flow issue, related to latest element ui package version
1 parent 859478c commit 7807029

File tree

6 files changed

+892
-478
lines changed

6 files changed

+892
-478
lines changed

package-lock.json

Lines changed: 874 additions & 454 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"dependencies": {
1919
"aws-sdk": "^2.395.0",
2020
"electron-default-menu": "^1.0.1",
21-
"element-ui": "^2.5.2",
21+
"element-ui": "^2.5.4",
2222
"lodash": "^4.17.11",
2323
"vue": "^2.5.22",
2424
"vue-awesome": "^3.3.1",
@@ -32,11 +32,11 @@
3232
"devDependencies": {
3333
"@types/jest": "^23.3.13",
3434
"@types/lodash": "^4.14.120",
35-
"@vue/cli-plugin-babel": "3.3.0",
36-
"@vue/cli-plugin-typescript": "3.3.0",
37-
"@vue/cli-plugin-unit-jest": "3.3.0",
38-
"@vue/cli-service": "3.3.1",
39-
"@vue/test-utils": "^1.0.0-beta.28",
35+
"@vue/cli-plugin-babel": "3.4.0",
36+
"@vue/cli-plugin-typescript": "3.4.0",
37+
"@vue/cli-plugin-unit-jest": "3.4.0",
38+
"@vue/cli-service": "3.4.0",
39+
"@vue/test-utils": "^1.0.0-beta.29",
4040
"babel-core": "^7.0.0-bridge.0",
4141
"electron": "^4.0.2",
4242
"element-theme-dark": "^1.0.2",
@@ -45,7 +45,7 @@
4545
"stylus": "^0.54.5",
4646
"stylus-loader": "^3.0.2",
4747
"ts-jest": "^23.10.5",
48-
"typescript": "^3.2.4",
48+
"typescript": "^3.3.1",
4949
"vue-cli-plugin-electron-builder": "github:nklayman/vue-cli-plugin-electron-builder",
5050
"vue-cli-plugin-element": "^1.0.1",
5151
"vue-template-compiler": "^2.5.22"

src/components/RecordFooter.vue

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@
1111
el-row
1212
el-row(class="popover-row") Maximum rows in table
1313
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
1515
el-row(class="popover-row")
1616
el-checkbox(v-model="checked" @change="getLimitedRows(null)") No Limit
1717
el-row(class="popover-close")
1818
el-button(size="mini" plain type="primary" @click="visible = false") Close
1919
i(class="el-icon-setting settings" slot="reference" title="Table Settings")
2020
i(
2121
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()"
2424
)
2525
.pageIndex(
26-
) {{ lastEvaluatedKeyIndex + 1 }}
26+
) {{ records.lastEvaluatedKeyIndex + 1 }}
2727
i(
2828
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()"
3131
)
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
3333
el-col(:span="6" class="itemCount") {{itemCount ? itemCount : 0}} rows in {{currentTable}}
3434
</template>
3535

@@ -46,14 +46,11 @@
4646
@Prop(Function) private generateMeta: any;
4747
@Prop(Function) private refreshTable: any;
4848
@Prop(Function) private getNextRecords: any;
49+
@Prop(Object) private records!: any;
4950
@Prop(Function) private getPreviousRecords: any;
5051
@Prop(Function) private getLimitedRows: any;
5152
@Prop(String) private currentTable!: string;
5253
@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;
5754
@Prop(Array) private list!: any[];
5855
}
5956
</script>

src/components/SidebarTables.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:value="db.name"
1111
)
1212
el-row(class="input-field")
13-
el-input(placeholder="Search Table" @keyup.native="filterTextChange" :value="filterText" suffix-icon="el-icon-search" spellcheck="false")
13+
el-input(placeholder="Search Table" @input="filterTextChange" :value="filterText" suffix-icon="el-icon-search" spellcheck="false")
1414
el-row(class="table-actions")
1515
el-col(:span="12" class="title") TABLES
1616
el-col(:span="12" class="actions")

src/containers/TableRecords.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@
3232
:currentTable="currentTable"
3333
:itemCount="itemCount"
3434
:getLimitedRows="getLimitedRows"
35-
:limit="records.limit"
35+
:records="records"
3636
:getPreviousRecords="getPreviousRecords"
3737
:getNextRecords="getNextRecords"
38-
:evaluatedKeys="records.evaluatedKeys"
39-
:lastEvaluatedKeyIndex="records.lastEvaluatedKeyIndex"
40-
:filtered="records.filtered"
4138
:list="tableDataPage"
4239
)
4340
</template>

src/store/mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function setCurrentTable(state: RootState, tableName: string) {
8686
}
8787

8888
function filterTextChange(state: RootState, filterField: any) {
89-
state.filterText = filterField.target.value;
89+
state.filterText = filterField;
9090
}
9191

9292
const mutations: MutationTree<RootState> = {

0 commit comments

Comments
 (0)