From ca1bf2547ffff2c98c4ec2410f35342db3a70290 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sun, 5 Jun 2022 12:18:07 +0300 Subject: [PATCH] fix: Persian language moving across table Signed-off-by: mertmit --- .../project/spreadsheet/views/GridView.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/views/GridView.vue b/packages/nc-gui/components/project/spreadsheet/views/GridView.vue index b6643f65ee..040ac60375 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/GridView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/GridView.vue @@ -390,7 +390,8 @@ export default { aggCount: [], dragOver: false, gridViewCols: {}, - unsaved: false + unsaved: false, + rightToLeftLanguages: ['fa'] }), computed: { selectAll: { @@ -660,13 +661,21 @@ export default { break // left case 37: - if (this.selected.col > 0) { + if (this.rightToLeftLanguages.includes(this.$store.state.settings.language)) { + if (this.selected.col < this.colLength - 1) { + this.selected.col++ + } + } else if (this.selected.col > 0) { this.selected.col-- } break // right case 39: - if (this.selected.col < this.colLength - 1) { + if (this.rightToLeftLanguages.includes(this.$store.state.settings.language)) { + if (this.selected.col > 0) { + this.selected.col-- + } + } else if (this.selected.col < this.colLength - 1) { this.selected.col++ } break