Hedi
Don't update the whole page for live components?
Hello. when i have a ->live() component, it obviously updates the page again, but every single query is also pointlessly ran again. is there any way to prevent this? so that only required ones are updated?
this will significantly improve efficiency and refresh times when i change a live input
this happens inside my form, where i have
Select
that lets you select a user. and when you select a user, it updates the whole page, and every single query (of other Selects) inside that page is ran again3 replies
Don't update the whole page for live components?
Hello. when i have a
->live()
component, it obviously updates the page again, but every single query is also pointlessly ran again. is there any way to prevent this? so that only required ones are updated?
this will significantly improve efficiency and refresh times when i change a live input3 replies
get a table's result programatically
hello, i have a table like this
inside this table (it's inside a custom page) i want to get table's records when a filter is changed, or a search has completed, etc... is that possible to get a callback when the table updates?
i think i should explain why i wanna do this, i want to use this with a barcode scanner. when the user searches for a barcode, i want to check when there's only one result, and i add that record to the cart.
thank you in advance!
3 replies
TextInput, don't count stripped characters?
hello, i have a TextInput that converts the typed text from "12312312312" into "1234 123 12 12" for easier readability. and i set the
->maxLength(14)->minLength(14)
at 14, because that's how i can allow the user to actually type the number with the spaces included and i make sure the user writes the entire 11 numbers.
but this always fails, because when ->stripCharacters(' ')
is ran, the length becomes 11, and the ->minLength(11)
fails. now when i change my code to ->maxLength(11)->minLength(11)
this also fails because the field won't allow the user from writing more than 11 characters as the spaces are also counted.
here's my entire code
i apologize for the spaghetti.
if you're reading this and don't understand what i'm trying to do, please at least let me know so i can do a better explanation7 replies
Repeater deletes the record instead of updating it
Hello, i have a repeater like this, the repeater is too long i'll just paste the essential lines
the problem occurs inside
CheckinResource::calculateActualPrices
, below is the code of this method
as you can see, i'm iterating through the repeater records, i calculate the actual_quantity_price, then add that changed record to a new list. then i assign that new list to the repeater.
this causes the repeater to delete all the records and creating new ones, i know this is kinda expected to happen. but i was wondering, is there like a primary key (using the id inside $product variable) that i can assign to each repeater, so instead of deleting and creating, it updates the record based on the $product's id. thanks for any suggestions!7 replies
Showing a different tables by choosing the tab?
hello, i have a ProductResource, but i want to have a StockResource (which shows the amount of products the user has) in the same page, but switch between the tables using a tab, is tab possible?
2 replies
conditionally show editForm in Select
hello, i have a table that holds names, the user_id in the Name might be null which means it's a default Name, but users can create their own names and edit them.
but i don't want the default names to be editable, how can i hide the editForm when the user_id is null? i haven't been able to come up with an idea
here's what i have so far, thanks in advance!
3 replies
auto refresh filament page when changing code?
hello, i'm using vite and filamentphp, but when i edit something, say for example adding a form component, i have to manually go back to the browser and refresh the page. is this auto refresh not supported in filament or am i doing something wrong?
here's my
vite.config.js
file
3 replies
file upload takes too long and ends up with an error
hello, when i try to upload a large file (100mb) this happens. it rotates for a couple seocnds, then the rotation disappears and after a couple minutes the upload fails with "error during upload".
this is my code
small files works fine, this only happens with large files.
thank you in advance!
3 replies