Livewire TypeError
I'm loading messages from the database. When first loaded, only the messages with the date of today are loaded.
public function mount(){ $this->today = Carbon::now()->format('Y/m/d'); $this->selectedDatum = $this->today; }
And the the render method:
$logitems = Logmelding::where('datum',$this->selectedDatum) ->orderBy('datum','desc') ->paginate(10);
Works fine.
There is a Datepicker on the page to select other dates (with wire:model:"selectedDatum'). Works fine as long as I select dates that have entries in the database.
When I choose a date that has no entries in the database, of course nothing gets rendered in the foreach loop. However, when after that I choose a date that does have entries in the database, the messages are not loaded.
The console gives the following message:
Uncaught (in promise) TypeError: Illegal invocation
Please or to participate in this conversation.