feat(ui): make buildFieldInputTemplate arg name consistent

This commit is contained in:
psychedelicious 2023-11-26 21:07:49 +11:00
parent ad9c954a58
commit 654591cbf3

View File

@ -326,7 +326,7 @@ export const TEMPLATE_BUILDER_MAP: Record<
export const buildFieldInputTemplate = ( export const buildFieldInputTemplate = (
fieldSchema: InvocationFieldSchema, fieldSchema: InvocationFieldSchema,
name: string, fieldName: string,
fieldType: FieldType fieldType: FieldType
): FieldInputTemplate => { ): FieldInputTemplate => {
const { const {
@ -342,8 +342,8 @@ export const buildFieldInputTemplate = (
// This is the base field template that is common to all fields. The builder function will add all other // This is the base field template that is common to all fields. The builder function will add all other
// properties to this template. // properties to this template.
const baseField: Omit<FieldInputTemplate, 'type'> = { const baseField: Omit<FieldInputTemplate, 'type'> = {
name, name: fieldName,
title: fieldSchema.title ?? (name ? startCase(name) : ''), title: fieldSchema.title ?? (fieldName ? startCase(fieldName) : ''),
required, required,
description: fieldSchema.description ?? '', description: fieldSchema.description ?? '',
fieldKind: 'input' as const, fieldKind: 'input' as const,