Skip to content

fix: Support nova-flexible-content random key attribute format (#4)#10

Merged
iamgerwin merged 2 commits into
mainfrom
fix/issue-4-flexible-random-key-format
Nov 25, 2025
Merged

fix: Support nova-flexible-content random key attribute format (#4)#10
iamgerwin merged 2 commits into
mainfrom
fix/issue-4-flexible-random-key-format

Conversation

@iamgerwin

Copy link
Copy Markdown
Owner

Summary

Fixed regex patterns to support nova-flexible-content's random key attribute format.

Root Cause

The package was only matching numeric index patterns like overlay_items__0__ but nova-flexible-content uses random alphanumeric keys like cSkn6uKpVHMkMLmI__.

From the debug logs:

Container attribute: cSkn6uKpVHMkMLmI__

Solution

Added Pattern 3 to handle random key format:

  • extractPrefixFromAttribute(): Added ^([a-zA-Z0-9]+__) pattern
  • extractBaseAttribute(): Added ^[a-zA-Z0-9]+__(.+)$ pattern

Files Changed

File Changes
resources/js/components/FormField.vue Added random key regex patterns
resources/js/components/DetailField.vue Added random key regex patterns
dist/js/field.js Rebuilt assets

Fixes #4

Updated regex patterns in extractPrefixFromAttribute() and extractBaseAttribute()
to handle random alphanumeric keys like 'cSkn6uKpVHMkMLmI__' instead of just
numeric index patterns like 'overlay_items__0__'

Added Pattern 3: ^([a-zA-Z0-9]+__) for random key format
@iamgerwin iamgerwin merged commit b6f73b6 into main Nov 25, 2025
0 of 2 checks passed
@iamgerwin iamgerwin deleted the fix/issue-4-flexible-random-key-format branch November 25, 2025 03:52
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.

NovaDependencyContainer inside Flexible field not showing dependent fields

1 participant