mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
49 lines
1.1 KiB
Vue
49 lines
1.1 KiB
Vue
<template>
|
|
<div
|
|
ref="cell"
|
|
class="grid-view__cell active"
|
|
:class="{
|
|
editing: editing,
|
|
invalid: editing && !valid,
|
|
}"
|
|
@contextmenu="stopContextIfEditing($event)"
|
|
>
|
|
<div v-show="!editing" class="grid-field-text">
|
|
<a
|
|
:href="'mailto:' + value"
|
|
target="_blank"
|
|
rel="nofollow noopener noreferrer"
|
|
>{{ value }}</a
|
|
>
|
|
</div>
|
|
<template v-if="editing">
|
|
<input
|
|
ref="input"
|
|
v-model="copy"
|
|
type="text"
|
|
class="grid-field-text__input"
|
|
/>
|
|
<div v-show="!valid" class="grid-view__cell-error align-right">
|
|
{{ error }}
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import gridField from '@baserow/modules/database/mixins/gridField'
|
|
import gridFieldInput from '@baserow/modules/database/mixins/gridFieldInput'
|
|
|
|
export default {
|
|
mixins: [gridField, gridFieldInput],
|
|
methods: {
|
|
afterEdit() {
|
|
this.$nextTick(() => {
|
|
this.$refs.input.focus()
|
|
this.$refs.input.selectionStart = this.$refs.input.selectionEnd = 100000
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|