Browse Source

fix: duration webhook trigger

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/2438/head
mertmit 2 years ago
parent
commit
d10088d1b2
  1. 1
      packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue
  2. 13
      packages/nc-gui/components/project/spreadsheet/components/editableCell/DurationCell.vue
  3. 4
      packages/nc-gui/components/project/spreadsheet/mixins/cell.js

1
packages/nc-gui/components/project/spreadsheet/components/EditableCell.vue

@ -42,6 +42,7 @@
:is-form="isForm" :is-form="isForm"
:column="column" :column="column"
:is-locked="isLocked" :is-locked="isLocked"
v-on="parentListeners"
/> />
<boolean-cell <boolean-cell

13
packages/nc-gui/components/project/spreadsheet/components/editableCell/DurationCell.vue

@ -7,6 +7,7 @@
@blur="onBlur" @blur="onBlur"
@keypress="checkDurationFormat($event)" @keypress="checkDurationFormat($event)"
@keydown.enter="isEdited && $emit('input', durationInMS)" @keydown.enter="isEdited && $emit('input', durationInMS)"
v-on="parentListeners"
> >
<div v-if="showWarningMessage == true" class="duration-warning"> <div v-if="showWarningMessage == true" class="duration-warning">
<!-- TODO: i18n --> <!-- TODO: i18n -->
@ -51,6 +52,18 @@ export default {
}, },
durationType() { durationType() {
return this.column?.meta?.duration || 0 return this.column?.meta?.duration || 0
},
parentListeners() {
const $listeners = {}
if (this.$listeners.blur) {
$listeners.blur = this.$listeners.blur
}
if (this.$listeners.focus) {
$listeners.focus = this.$listeners.focus
}
return $listeners
} }
}, },
mounted() { mounted() {

4
packages/nc-gui/components/project/spreadsheet/mixins/cell.js

@ -81,7 +81,6 @@ export default {
UITypes.Number, UITypes.Number,
UITypes.Decimal, UITypes.Decimal,
UITypes.Percent, UITypes.Percent,
UITypes.Duration,
UITypes.Count, UITypes.Count,
UITypes.AutoNumber, UITypes.AutoNumber,
UITypes.SpecificDBType, UITypes.SpecificDBType,
@ -92,7 +91,8 @@ export default {
return [ return [
UITypes.Currency, UITypes.Currency,
UITypes.Year, UITypes.Year,
UITypes.Time UITypes.Time,
UITypes.Duration
].includes(this.uiDatatype) ].includes(this.uiDatatype)
} }
} }

Loading…
Cancel
Save