Update view component usage in template forms: Replaced extraAttributes with viewData method in HeaderTemplateForm, FooterTemplateForm, and SectionTemplateForm schemas to align with Filament 4.x standards. Enhanced the template-preview Blade component to utilize local variables for type and field name, improving data handling and consistency.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
@php
|
||||
$previewUrl = route('template.preview');
|
||||
$type = $attributes->get('data-type') ?? 'section';
|
||||
$fieldName = $attributes->get('data-field-name') ?? 'html_content';
|
||||
$type = $type ?? 'section';
|
||||
$fieldName = $fieldName ?? 'html_content';
|
||||
@endphp
|
||||
|
||||
<div
|
||||
x-data="templatePreview(@js($previewUrl), @js($type), @js($fieldName))"
|
||||
class="template-preview-wrapper w-full"
|
||||
|
||||
Reference in New Issue
Block a user