F
Filament2mo ago
EMMAN

REMOVE DELAY WHILE TYPING ON LIVE() and AFTERSTATEUPDATED()

Forms\Components\TextInput::make('firstname') ->required(true) ->maxLength(50) ->label('First Name') ->placeholder('First Name') ->live() ->afterStateUpdated(fn ($state, callable $set, $get) => $set('fullname', static::generateFullName($state, $get('middlename'), $get('lastname'), $get('extensionname')))),
how can i remove the delay while typing on textinput on live() and ->afterStateUpdated()
7 Replies
Tetracyclic
Tetracyclic2mo ago
With live() on a TextInput it will send a network request for every character typed. Is the delay simply the time it's taking for the request to hit the server?
EMMAN
EMMAN2mo ago
my exact problem:
EMMAN
EMMAN2mo ago
i just want to auto update the fullname, based on firstname, middlename, lastname, extension, automatically
dissto
dissto2mo ago
Just use ->live(onBlur: true) i dont see no benefit of it being immediately put there 🤔
toeknee
toeknee2mo ago
or ->lazy()
EMMAN
EMMAN2mo ago
THANK YOU SO MUCH GUYS. ->live(onBlur: true) is the solution
Want results from more Discord servers?
Add your server
More Posts