Skip to content

Commit 27d78df

Browse files
committed
Refactor card rendering to utilize schema object for improved Livewire compatibility
1 parent b605e96 commit 27d78df

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

resources/views/livewire/card.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
</div>
3737

3838
{{-- Render card schema with compact spacing --}}
39-
@if(isset($record['schema_html']) && !empty($record['schema_html']))
39+
@if(filled($record['schema']))
4040
<div class="space-y-1 [&_.fi-sc-flex]:gap-2 [&_.fi-sc-flex.fi-dense]:gap-1 [&_.fi-in-entry]:gap-y-0.5 [&_.fi-in-entry-content-ctn]:gap-x-1.5">
41-
{!! $record['schema_html'] !!}
41+
{{ $record['schema'] }}
4242
</div>
4343
@endif
4444
</div>

src/Concerns/HasBoardRecords.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public function formatBoardRecord(Model $record): array
136136
if ($schema !== null) {
137137
// The schema is already built and configured
138138
$schema->model($record);
139-
140-
// Render the entire schema as HTML
141-
$formatted['schema_html'] = $schema->toHtml();
139+
140+
// Store the schema object with record context for proper Livewire rendering
141+
$formatted['schema'] = $schema;
142142
}
143143
}
144144

0 commit comments

Comments
 (0)