|
|
|
@ -182,9 +182,6 @@ function initIntersectionObserver() {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const numberInputAlignment = computed(() => { |
|
|
|
|
return isEditColumnMenu.value ? 'left' : 'right' |
|
|
|
|
}) |
|
|
|
|
// observe the cell when it is mounted |
|
|
|
|
onMounted(() => { |
|
|
|
|
initIntersectionObserver() |
|
|
|
@ -204,10 +201,11 @@ onUnmounted(() => {
|
|
|
|
|
:class="[ |
|
|
|
|
`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, |
|
|
|
|
{ 'text-brand-500': isPrimary(column) && !props.virtual && !isForm }, |
|
|
|
|
{ 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField && !isExpandedFormOpen }, |
|
|
|
|
{ 'nc-grid-numeric-cell-right': isGrid && isNumericField && !isEditColumnMenu && !isForm && !isExpandedFormOpen }, |
|
|
|
|
{ |
|
|
|
|
'h-[40px]': !props.editEnabled && isForm && !isSurveyForm && !isAttachment(column) && !props.virtual, |
|
|
|
|
}, |
|
|
|
|
{ 'nc-grid-numeric-cell-left': (isForm && isNumericField && isExpandedFormOpen) || isEditColumnMenu }, |
|
|
|
|
]" |
|
|
|
|
@keydown.enter.exact="navigate(NavigateDir.NEXT, $event)" |
|
|
|
|
@keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)" |
|
|
|
@ -263,10 +261,16 @@ onUnmounted(() => {
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.nc-grid-numeric-cell { |
|
|
|
|
text-align: v-bind(numberInputAlignment); |
|
|
|
|
.nc-grid-numeric-cell-left { |
|
|
|
|
text-align: left; |
|
|
|
|
:deep(input) { |
|
|
|
|
text-align: left; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.nc-grid-numeric-cell-right { |
|
|
|
|
text-align: right; |
|
|
|
|
:deep(input) { |
|
|
|
|
text-align: v-bind(numberInputAlignment); |
|
|
|
|
text-align: right; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|