Does afterStateUpdatedJs work with Form table repeater field ?

I try it, but won't work Just try a console.log in it It work just other way (without )
19 Replies
Dan Harrin
Dan Harrin4mo ago
no, it will only work on input fields, not fields that contain others
Dan-webplusm
Dan-webplusmOP4mo ago
Thanks for your answer Boss 😎 , i'll investigate to PR it (than i can)
Dan-webplusm
Dan-webplusmOP4mo ago
Finaly, got it. Thank to $get and $set on alpine
Sadegh Zabeh
Sadegh Zabeh2mo ago
Hi. How? Can share?
Punyapal Shah
Punyapal Shah2mo ago
it works on the repeater, but not on the table repeater. I'll try to check if I can solve I'll make a PR.
Dan-webplusm
Dan-webplusmOP2mo ago
Hey "pinkary Man 😎 ", that's would be great if you solve it
Punyapal Shah
Punyapal Shah2mo ago
I'll try. If you already have anything around it please let me know 🥲 I actually make it work just now $set() $get() stuff is not working
Punyapal Shah
Punyapal Shah2mo ago
updated code in vendor\filament\forms\resources\views\components\repeater\table.blade.php file
Dan-webplusm
Dan-webplusmOP2mo ago
it depend on the state inside one item (the row). Also, the state inside it is not what you suppose it would be. mine is like that inside the item : /data.lignes.record-01j24jg5n7taa8xfmfzw6a8z4t.price_ht
awcodes
awcodes2mo ago
$get and $set use directory style traversal. So the keys shouldn’t matter.
Dan-webplusm
Dan-webplusmOP2mo ago
In my case, it is (maybe i'm wrong and stupid 🤣 (JK)), when im trying $get('price_ht'), this won't work
awcodes
awcodes2mo ago
What does $get(‘./price_ht’) give you? Might be weird inside a repeater though, since the state of the repeater is kinda nested to the form data.
Dan-webplusm
Dan-webplusmOP2mo ago
undefined, but this is a repeater with table. Dan tell me that inside table repeater , $get, $set won't work as expect https://discord.com/channels/883083792112300104/1388903850169335808/1389207443459936300
Punyapal Shah
Punyapal Shah2mo ago
@Dan Harrin this code seems to be working; it has $state, $get, and $set. I'm just thinking if I'm missing something related to statepath. I can open a work-in-progress PR if you can help a little further with it?
Dan Harrin
Dan Harrin2mo ago
if you want help with a pr please also ensure there is an issue with a reproduction repository
Punyapal Shah
Punyapal Shah2mo ago
this is fully working code
Punyapal Shah
Punyapal Shah2mo ago
@Dan Harrin what we see is we are intentionally not allowing fi-hidden to hide tds in table repeater. so even the hiddenJs and visibleJs is working we cannot make them actually working. so I should just do not add support for them or do you want me to adjust css?
No description
Punyapal Shah
Punyapal Shah2mo ago
GitHub
feat: make afterStateUpdatedJs work on table repeater by MrPunyap...
Description fixes #17333 Visual changes None Functional changes Code style has been fixed by running the composer cs command. Changes have been tested to not break existing functionality. Docum...
Dan-webplusm
Dan-webplusmOP2mo ago
this work very well, thank for that missing stuffs

Did you find this page helpful?