Skip to content

Commit 396d4d9

Browse files
committed
docs
1 parent b28df0c commit 396d4d9

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

docs/dist/4.x/schemas/custom-components/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ <h2 id="custom-component-classes"><a class="heading-anchor" href="#custom-compon
301301
<span class="line"></span></code></pre>
302302
<p>It will also create a view file at <code>resources/views/filament/schemas/components/chart.blade.php</code>.</p>
303303
<p>You may use the same utilities as you would when <a href="#inserting-a-blade-view-into-a-schema">inserting a Blade view into a schema</a> to <a href="#rendering-the-components-child-schema">render the component’s child schema</a>, <a href="#accessing-the-state-of-another-component-in-a-blade-view">access another component’s live state</a>, <a href="#accessing-the-eloquent-record-in-a-blade-view">access the current Eloquent record</a>, <a href="#accessing-the-current-operation-in-a-blade-view">access the current operation</a>, <a href="#accessing-the-current-livewire-component-instance-in-a-blade-view">access the current Livewire component instance</a>, and <a href="#accessing-the-current-component-instance-in-a-blade-view">access the current component instance</a>.</p>
304+
<div class="my-3 rounded-lg border-s-4 px-4 py-3 prose-p:my-0 border-sky-400 bg-sky-400/10 text-sky-950 dark:bg-sky-500/20 dark:text-sky-100 prose-code:[p_&#38;]:bg-sky-600/10 prose-code:dark:[p_&#38;]:bg-white/20"> <div class="flex items-center gap-2 pb-2"> <svg width="1em" height="1em" viewBox="0 0 24 24" class="h-6 w-6" aria-hidden="true" data-icon="info"> <use href="#ai:local:info"></use> </svg> <p class="text-sm font-bold">NOTE</p> </div> <p>Filament schema components are <strong>not</strong> Livewire components. Defining public properties and methods on a schema component class will not make them accessible in the Blade view.</p> </div>
304305
<h3 id="adding-a-configuration-method-to-a-custom-component-class"><a class="heading-anchor" href="#adding-a-configuration-method-to-a-custom-component-class"><span class="heading-anchor-icon" aria-hidden="true">#</span></a>Adding a configuration method to a custom component class</h3>
305306
<p>You may add a public method to the custom component class that accepts a configuration value, stores it in a protected property, and returns it again from another public method:</p>
306307
<pre class="astro-code material-theme-palenight" style="background-color:#292D3E;color:#babed8;overflow-x:auto" tabindex="0" data-language="php"><code><span class="line"><span style="color:#F78C6C">use</span><span style="color:#BABED8"> Filament</span><span style="color:#89DDFF">\</span><span style="color:#BABED8">Schemas</span><span style="color:#89DDFF">\</span><span style="color:#BABED8">Components</span><span style="color:#89DDFF">\</span><span style="color:#BABED8">Component</span><span style="color:#89DDFF">;</span></span>

0 commit comments

Comments
 (0)