Skip to content

Commit

Permalink
fix: manual page input not disabled when only one page is available
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Jul 23, 2021
1 parent 14577d1 commit 62f7e57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/renderer/components/WorkspacePropsTableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,13 @@ export default {
: this.localRow.default
: '';
}
else if (this.defaultValue.type === 'expression')
this.defaultValue.expression = this.localRow.default;
else if (this.defaultValue.type === 'expression') {
console.log(this.localRow.default);
if (this.localRow.default.toUpperCase().includes('ON UPDATE'))
this.defaultValue.expression = this.localRow.default.replace(/ on update.*$/i, '');
else
this.defaultValue.expression = this.localRow.default;
}
},
editON (event, content, field) {
if (field === 'length') {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/WorkspaceTableTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export default {
this.getTableData();
},
openPageMenu () {
if (this.isQuering) return;
if (this.isQuering || (this.results.length && this.results[0].rows.length < this.limit && this.page === 1)) return;
this.isPageMenu = true;
if (this.isPageMenu)
Expand Down

0 comments on commit 62f7e57

Please sign in to comment.