epertinez
Is there a way to intercept the activeTab parameter in the resource table function?
GREAT, that works.
So I only need to create
public function updatedActiveTab() {
// It tells me this parent function does not exists. parent::updatedActiveTab();
$this->resetTable();
}
And this way table gets called twice, but the second time $this->activeTab holds the correct value.
Thanks!!14 replies
Is there a way to intercept the activeTab parameter in the resource table function?
This way I can create a function in my component:
public function setTabTo($tab) {
$this->activeTab=$tab;
$this->resetTable();
return;
}
That changes the variable and then resets the table. The table function is called twice, as table is called before seting the variable, but it seems to work.14 replies
Is there a way to intercept the activeTab parameter in the resource table function?
I had
<x-filament::tabs.item :active="$activeTab === 'termes'" wire:click="$set('activeTab', 'termes')" >Termes</x-filament::tabs.item>
But I don't know how to listen for $set, so $set was called AFTER table($table) and $this->activeTab had the old incorrect tab.
If somebody can tell me what function do I have to create to listen $set('somevar','somevalue') I would appreciate. So far I tried updateSomevar($somevalue), but it does not work.
Anyway, I ended up changing the calls:14 replies
Conditional filter rendering by $activeTab
I am stocked in the same problem. I see livewire is sending an update in the request, BUT i don't know how to access livewire data neither so I cannot read the update to make sure all data is in sync before branching.
6 replies
Radical lazy/defer load on collapsible column.
Ok: Partially solved... I can created a PRIVATE (public does not work) attribute in my Widget class that saves the column I wanna pass the loadData function. So, instead of
public function table(Table $table): Table
{...
return $table->...->columns([ some columns, MyOwnColumn::make('someField') ])...
}
I have
private $myOwnColumn;
public function table(Table $table): Table
{...$this->myOwnColumn=MyOwnColumn::make('someField') ;
return $table->...->columns([ some columns, $this->myOwnColumn])...
}
This way, I can have a function loadData that calls $this->myOwnColumn->loadData(), and that last function is the one that sets readyToLoad flag in myOwnColumn so I can defer loading.
Yet... even if defer loading somewhat works... all columns are retreived at the same time, so it takes ages for them to load, even when I don't need them.
Unusable. The problem remains.3 replies
Calling method in custom field type
+1
I can add that in my case, the component receiving the call is the Widget, not the Column. If I create a dummy doSomething() function in the widget definition class, the error disapears. Yet, it is useless!
7 replies
Admin resource: Selectable table row text
Digging deeper I see that the problem is that all of those columns are <a> links to edit, so I cannot select the internal text because you cannot select internal text of a link. Yet typing ALT on the keyboard while using the mouse lets you subselect the text you want inside the link. I am going to tell my customer. Maybe it is obvious but I didn't know.
3 replies