Skip to content

Conversation

2eha0
Copy link
Contributor

@2eha0 2eha0 commented Sep 10, 2025

Summary

In this PR:

  • Fixed appearance prop of ObjectField
  • Card appearance by default for record array items
  • Added/fixed some test cases

Before

image

After

image

@2eha0 2eha0 requested review from a team as code owners September 10, 2025 06:27
@2eha0 2eha0 marked this pull request as draft September 10, 2025 06:29
@2eha0 2eha0 changed the title fix(entities-plugins): freeform - object field appearance fix(entities-plugins): freeform - default card appearance for record array Sep 10, 2025
v-bind="props"
appearance="card"
/>
</FieldRenderer>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer need overriding for record array

@kongponents-bot
Copy link
Collaborator

Preview components from this PR in consuming application

In consuming application project install preview versions of shared packages generated by this PR:

@kong-ui-public/entities-plugins@pr-2473

@@ -44,15 +32,11 @@
<CalloutsForm />

<ObjectField
appearance="card"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appearance is not working before, once I fixed it, it seems a bit weird, so let's remove it

@2eha0 2eha0 marked this pull request as ready for review September 10, 2025 06:58
@@ -164,6 +166,10 @@ const realResetLabelPath = computed(() => {

const fieldAttrs = useFieldAttrs(field.path!, toRef(() => ({ required, ...props, resetLabelPath: realResetLabelPath.value })))
const realAdded = computed(() => !fieldAttrs.value.required ? added.value ?? defaultAdded : true)
const wrapper = computed(() => {
if (appearance === 'card') return 'KCard'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (appearance === 'card') return 'KCard'
if (appearance === 'card') return KCard

And we should explicitly import components we are using here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants