F
Filament6mo 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
Tetracyclic6mo 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
EMMANOP6mo ago
my exact problem:
EMMAN
EMMANOP6mo ago
i just want to auto update the fullname, based on firstname, middlename, lastname, extension, automatically
dissto
dissto6mo ago
Just use ->live(onBlur: true) i dont see no benefit of it being immediately put there 🤔
toeknee
toeknee6mo ago
or ->lazy()
EMMAN
EMMANOP6mo ago
THANK YOU SO MUCH GUYS. ->live(onBlur: true) is the solution
Want results from more Discord servers?
Add your server