feat(Airtable Node): Overhaul (#6200)
This commit is contained in:
@@ -51,7 +51,16 @@ const emit = defineEmits<{
|
||||
|
||||
const ndvStore = useNDVStore();
|
||||
|
||||
const fieldsUi = computed<INodeProperties[]>(() => {
|
||||
function markAsReadOnly(field: ResourceMapperField): boolean {
|
||||
if (
|
||||
isMatchingField(field.id, props.paramValue.matchingColumns, props.showMatchingColumnsSelector)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return field.readOnly || false;
|
||||
}
|
||||
|
||||
const fieldsUi = computed<Array<Partial<INodeProperties> & { readOnly?: boolean }>>(() => {
|
||||
return props.fieldsToMap
|
||||
.filter((field) => field.display !== false && field.removed !== true)
|
||||
.map((field) => {
|
||||
@@ -64,11 +73,12 @@ const fieldsUi = computed<INodeProperties[]>(() => {
|
||||
required: field.required,
|
||||
description: getFieldDescription(field),
|
||||
options: field.options,
|
||||
readOnly: markAsReadOnly(field),
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
const orderedFields = computed<INodeProperties[]>(() => {
|
||||
const orderedFields = computed<Array<Partial<INodeProperties> & { readOnly?: boolean }>>(() => {
|
||||
// Sort so that matching columns are first
|
||||
if (props.paramValue.matchingColumns) {
|
||||
fieldsUi.value.forEach((field, i) => {
|
||||
@@ -333,7 +343,7 @@ defineExpose({
|
||||
:value="getParameterValue(field.name)"
|
||||
:displayOptions="true"
|
||||
:path="`${props.path}.${field.name}`"
|
||||
:isReadOnly="refreshInProgress"
|
||||
:isReadOnly="refreshInProgress || field.readOnly"
|
||||
:hideIssues="true"
|
||||
:nodeValues="nodeValues"
|
||||
:class="$style.parameterInputFull"
|
||||
|
||||
Reference in New Issue
Block a user