refactor: Fix type issues for parameter input components (#9449)

This commit is contained in:
Elias Meire
2024-05-21 15:04:20 +02:00
committed by GitHub
parent cd751e7cc8
commit 711c46f205
36 changed files with 315 additions and 243 deletions

View File

@@ -67,7 +67,7 @@ function markAsReadOnly(field: ResourceMapperField): boolean {
return field.readOnly || false;
}
const fieldsUi = computed<Array<Partial<INodeProperties> & { readOnly?: boolean }>>(() => {
const fieldsUi = computed<Array<INodeProperties & { readOnly: boolean }>>(() => {
return props.fieldsToMap
.filter((field) => field.display && field.removed !== true)
.map((field) => {
@@ -85,11 +85,11 @@ const fieldsUi = computed<Array<Partial<INodeProperties> & { readOnly?: boolean
});
});
const orderedFields = computed<Array<Partial<INodeProperties> & { readOnly?: boolean }>>(() => {
const orderedFields = computed<Array<INodeProperties & { readOnly: boolean }>>(() => {
// Sort so that matching columns are first
if (props.paramValue.matchingColumns) {
fieldsUi.value.forEach((field, i) => {
const fieldName = parseResourceMapperFieldName(field.name);
const fieldName = field.name && parseResourceMapperFieldName(field.name);
if (fieldName) {
if (props.paramValue.matchingColumns.includes(fieldName)) {
fieldsUi.value.splice(i, 1);