I can not find a way to update a Dashboard Widget from a Dropdown input i use in my board class like the code below describes. I don't want to create a new file for the Dropdown, is this allowed?
MyBoard.php
class MyBoard extends Dashboard
{
protected function content()
{
return [
Row::create([
Panel::create()->width(1/2)->sub([
Dropdown::create("ddinfooutline")
->title("View by")->items([
"Day"=>MenuItem::create()->icon("fas fa-info-circle")->onClick(function(){
// return Client::dashboard("CustomerBoard")->load();
return 'mydate';
$this->sibling("myWidget")->update();
}),
myWidget.php
class myWidget extends ComboChart
{
protected function dataSource()
{
// $range = $this->sibling("MyBoard")->value();
$range = $this->sibling("ddinfooutline")->value();