Browse Source

fix: undefined suggestion & toast sdk error msg

pull/1979/head
Wing-Kam Wong 3 years ago
parent
commit
1ec0f982bf
  1. 14
      packages/nc-gui/components/project/spreadsheet/components/editColumn/FormulaOptions.vue

14
packages/nc-gui/components/project/spreadsheet/components/editColumn/FormulaOptions.vue

@ -177,7 +177,7 @@ export default {
this.$toast.success('Formula column saved successfully').goAway(3000) this.$toast.success('Formula column saved successfully').goAway(3000)
return this.$emit('saved', this.alias) return this.$emit('saved', this.alias)
} catch (e) { } catch (e) {
this.$toast.error(e.message).goAway(3000) this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000)
} }
}, },
async update() { async update() {
@ -282,12 +282,16 @@ export default {
} }
}, },
suggestionListDown() { suggestionListDown() {
this.selected = ++this.selected % this.suggestion.length if (this.suggestion) {
this.scrollToSelectedOption() this.selected = ++this.selected % this.suggestion.length
this.scrollToSelectedOption()
}
}, },
suggestionListUp() { suggestionListUp() {
this.selected = --this.selected > -1 ? this.selected : this.suggestion.length - 1 if (this.suggestion) {
this.scrollToSelectedOption() this.selected = --this.selected > -1 ? this.selected : this.suggestion.length - 1
this.scrollToSelectedOption()
}
}, },
scrollToSelectedOption() { scrollToSelectedOption() {
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save