treii28
treii28
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
(which is why not being able to find a simple answer is so frustrating and pushing me to consider options other than filament - if all basic issues are going to be this much of an excruciating enema to find the answer, it's a bad sign)
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
I should add, underpining all of this, I'm trying to use this as a 'learning' sandbox project. Figuring out how to pass the state to and use it in livewire is the goal, not getting this particular widget to work.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
I went through four of the available libraries again. Only one of them (outside of the one I already tried to modify) matches my use case and it's HUGE. It could probably work 'as is' if it only supported image overlay - which, near as I can tell, it does not. Aaaaaand the method it uses to try to pass in the state is the first one I tried (which did not work)
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
And I don't need a 'copy paste' solution. I need to know the best practices, standard way someone is supposed to modify the state used by filament in the filament implementation of alpinejs. I have yet to see anything anywhere that shows a working example of this that isn't embeded in some 100000 lines-of-code existing library I'm supposed to 'source dive' (without knowing how filament uses alpinejs - it's like being told to go pick through a garbage dump to figure out how pizza is made)
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
I thought the implementation of alpine.js in filamentphp was tied to livewire. At least from what I could glean fromt he docs.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
The problem isn't on the php side of things. The interaction I need is in the browser, and unfortunately, the way livewire and alpinejs embed 'code' into html element attributes made it hard to trace those.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
Another great example, I went to this page: https://filamentphp.com/docs/3.x/support/assets#asynchronous-alpinejs-components I followed step-by-step creating the test-component. First it says: "When you run php artisan filament:assets, the compiled file will be copied into the /public directory." It didn't.... So I copied the file manually into the public directory. I then created a new custom form field component and followed it's example for the blade template and I get: " Internal Server Error Error Object of class Closure could not be converted to string " Even following the documentation to the letter, the code doesn't work.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
how to update state in custom field?
I tried adding it to my livewire component's blade template: <div x-data="{ state: $wire.{{ $applyStateBindingModifiers("$entangle('{$getStatePath()}')") }} }"> And I get: Internal Server Error ErrorException Undefined variable $applyStateBindingModifiers
8 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
how to update state in custom field?
where? in what context?
8 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
OK, I made some progress after finding a page that told me how to put the livewire state into the alpine.js finally: @entangle('livewire-state') So I can pass the livewire state into my google map wrapper class. Now the problem is the livewire-state doesn't seem to have the custom 'field state' in it anywhere. aaaaaand I'm no closer to a solution or understanding how the field state is supposed to be passed into and out of livewire/alpine.js components. This has been my whole week!
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
it seems to want something passed in, and again, I don't know how to do that and can't find any examples in the docs. I tried: <x-dynamic-component :component="$getFieldWrapperView()" :field="$field"> @livewire('gmap-location', [ 'state' => $wire.$entangle('{{ $statepath }}') ]) </x-dynamic-component> And get: Internal Server Error ErrorException Undefined variable $entangle
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
Is $state something 'built in' to the livewire? e.g. for dependency injection? i.e. can I do something like: function mount($state) { .... }? ?
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
(I think I've figured out how to pass initial values in [to the map] for an 'existing' location. I can't figure out how to communicate between the map/javascript and the filament form fields lat/lon and vice versa)
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
from that example, again mount() would only seem to help me upon initialization of the map. I'm trying to utilize the map as a ->live() component/field and the problem I'm having is in the interaction and passing of data in and out 'after' the map is initilized.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
Part of the problem I'm running into is that the documentation for things like Livewire and Alpine.js are more specific to interactions within the blade template, not within javascript.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
I see for example that I could use: use Livewire\Component as Livewire; function (Livewire $livewire) { // ... } But this seems to apply to the current 'field' in the form. So I can't assume I can directly access the component of 'location' (the map) from the afterStateUpdated context of the TextField 'latitude'
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
mount() would seem to allow me to pass in any pre-existing value (on initialization of the map), but changes in the text fields or changes on the map - still not sure how to handshake those in filament
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
OK, I think I see in that link something that might make the job easier or at least less complicated, but it still doesn't give me good details on getting information in and out. Namely referring to directly loading a Livewire component. i.e. I can remove the layer of needing to wrap a custom 'field' around it if I am reading this correctly. But then if I use Livewire::make('MyComponent', []), there's still a question on how I interact with the lat/lon fields and vice versa.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
I even tried using a basic 'slider' and was able to get information in and back out again and found the method it used didn't seem to work when I tried to do the same with the map code. That and adding the map broke the slider/interaction somehow - I don't know how.
51 replies
FFilament
Created by treii28 on 12/16/2024 in #❓┊help
Why does nothing in this #$%^#$ work as described in docs?
KML isn't the problem, google maps isn't the problem. Knowing how to pass values in and out again is the problem.
51 replies