Browse Source

fix: undefined suggestion & toast sdk error msg

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

6
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() {
if (this.suggestion) {
this.selected = ++this.selected % this.suggestion.length this.selected = ++this.selected % this.suggestion.length
this.scrollToSelectedOption() this.scrollToSelectedOption()
}
}, },
suggestionListUp() { suggestionListUp() {
if (this.suggestion) {
this.selected = --this.selected > -1 ? this.selected : this.suggestion.length - 1 this.selected = --this.selected > -1 ? this.selected : this.suggestion.length - 1
this.scrollToSelectedOption() this.scrollToSelectedOption()
}
}, },
scrollToSelectedOption() { scrollToSelectedOption() {
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save