F
Filament3mo ago
Eskie

DateTimePicker(Non Native) Reactive Infinite Bug

public static function configure(Schema $schema): Schema
{
return $schema
->components([
DateTimePicker::make('updated_at')
->default(fn () => now())
->native(false)
->live(),
Actions::make([
Action::make('activateNow')
->label('Activate Now')
->color(Color::Green)
->action(function (Set $set): void {
$set('updated_at', now());
}),
])
]);
}
public static function configure(Schema $schema): Schema
{
return $schema
->components([
DateTimePicker::make('updated_at')
->default(fn () => now())
->native(false)
->live(),
Actions::make([
Action::make('activateNow')
->label('Activate Now')
->color(Color::Green)
->action(function (Set $set): void {
$set('updated_at', now());
}),
])
]);
}
Clicking the button activateNow keeps the DateTimePicker updates to infinity
5 Replies
Kikechi
Kikechi3mo ago
@Eskie try removing live() on the DateTimePicker component
Eskie
EskieOP3mo ago
I need the live function in my main app.. i just posted the snippet for them to test up
Dennis Koch
Dennis Koch3mo ago
Is that all of the code? I don’t see how that Action should be called in a loop unless you have afterStateUpdated there.
Eskie
EskieOP3mo ago
Me too.. in that simple code.. i didn't expect there is an infinite update of DateTimePicker but you can try it
Dennis Koch
Dennis Koch3mo ago
If there is nothing else that could interfere with it, please open an issue on GitHub.

Did you find this page helpful?