andries
andries
FFilament
Created by AnnA|Sythe|Jake on 5/20/2024 in #❓┊help
Filament Table Group by key in JSON column of query
I am looking for the same thing, but the fact that is . notated, makes the Group class assume it is a relationship. I am not even able to get them grouped... 🙂
2 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
thx, I will
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
I could probably add some checks in the foreach loop to check if the key is actually the fieldname... but besides that it all seems functional. If you have any feedback, please feel free
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
data = {};
data[config.fieldLat] = lat;
data[config.fieldLng] = lng;
// save it to the backend
$wire.set(config.statePath, data)
data = {};
data[config.fieldLat] = lat;
data[config.fieldLng] = lng;
// save it to the backend
$wire.set(config.statePath, data)
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
and this is the blade part:
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
not sure though how dangerous this is... 🙂
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
public function dehydrateState(array &$state, bool $isDehydrated = true): void
{
$stateToDeHydrate = $this->getStateToDehydrate()[$this->getStatePath()];
foreach ($stateToDeHydrate as $key => $value) {
Arr::set($state[$this->getContainer()->getStatePath()], $key, $value);
}
}
public function dehydrateState(array &$state, bool $isDehydrated = true): void
{
$stateToDeHydrate = $this->getStateToDehydrate()[$this->getStatePath()];
foreach ($stateToDeHydrate as $key => $value) {
Arr::set($state[$this->getContainer()->getStatePath()], $key, $value);
}
}
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
I overwrite the dehydrateState() method
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
but I found a way
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
package
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
so now I am looking into extending a Component, but I don't see how to interact with the state of the form
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
yes but what kind of component would that be? First I thought I could make a Group component, and add multiple fields to it that are hidden. But I don't see any way in extending a FieldComponent and actually add other hidden fields.
20 replies
FFilament
Created by andries on 5/16/2024 in #❓┊help
Multi field FieldComponent
hi Tally, that is indeed what I found, but we would like to do this differently, as we need to search on certain fields in the database (and I think that it is faster to search on a number field then on a JSON field)
20 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
I think this is what I want 🙂 So my solution was to base the table on the parent table (orders) and have a panel that renders a custom "orderlines" component. Important to know is to adapt your query in your OrderResource, so that it already contains the orderlines.
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
or actually now that I think about it, it could be a table base on orders, with a custom column... that show a table of the orderlines 🙂
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
anyway, I could understand this is out of scope, in that case we will show the list of orders, and a details modal (but it would have been nice if the above would be possible)
13 replies
FFilament
Created by andries on 8/10/2023 in #❓┊help
Summariser showing related data in group
yes but paginated "multiple tables" where the pagination should be on order level. So show order 1 -> 10 with orderlines, show order 11 -> 20 with orderlines etc. Is this possible? I have actually even no clue how this could ever work.
13 replies