Files
nocodb/packages/nc-gui/components/cell/ClampedText.vue
Anbarasu a5fc9be175 feat: Formula colouring and improved suggestions (#9072)
* feat: formula language

* feat: formula coloring and ux improvements

* fix: suggestions generation

* fix: handle undefined editor

* fix: handle formula errors

* fix: update imports

* fix: minor corrections

* fix: test corrections

* fix: increase timeout

* fix: clear existing formulas before pasting

* fix: ux improve

* fix: ux improve

* fix: coloring issue

* fix: remove styles

* fix: handle wrapping

* fix: bug fixes

* fix: strict suggestion handling

* fix: update indent strategy

* fix: handle formula in nested state and unbalanced parens

* fix: formula fix

* chore: sync dependencies
2024-07-30 13:47:07 +05:30

27 lines
629 B
Vue

<script setup lang="ts">
const props = defineProps<{
value?: string | number | null
lines?: number
}>()
</script>
<template>
<div v-if="!props.lines || props.lines === 1" class="text-ellipsis overflow-hidden">
<span :style="{ 'word-break': 'keep-all', 'white-space': 'nowrap' }">{{ props.value ?? '' }}</span>
</div>
<div
v-else
:style="{
'display': '-webkit-box',
'max-width': '100%',
'-webkit-line-clamp': props.lines || 1,
'-webkit-box-orient': 'vertical',
'overflow': 'hidden',
'word-break': 'break-all',
}"
>
{{ props.value ?? '' }}
</div>
</template>