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