refactor: refs #6897 improve condition checks in VnTable and remove unused emit in VnInputTime for cleaner code
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Pablo Natek 2025-02-11 16:44:05 +01:00
parent b403daff0e
commit 7e993cab73
2 changed files with 4 additions and 5 deletions

View File

@ -351,12 +351,12 @@ const clickHandler = async (event) => {
const colField = clickedElement.getAttribute('data-col-field');
const column = $props.columns.find((col) => col.name === colField);
if (editingRow.value != null && editingField.value != null) {
if (editingRow.value == rowIndex && editingField.value == colField) {
if (editingRow.value !== null && editingField.value !== null) {
if (editingRow.value === rowIndex && editingField.value === colField) {
return;
} else {
destroyInput(editingRow.value, editingField.value);
}
destroyInput(editingRow.value, editingField.value);
}
if (isEditableColumn(column))
await renderInput(Number(rowIndex), colField, clickedElement);

View File

@ -23,7 +23,6 @@ const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
const dateFormat = 'HH:mm';
const isPopupOpen = ref();
const hover = ref();
const emit = defineEmits(['blur']);
const styleAttrs = computed(() => {
return props.isOutlined