You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If an item with the Boolean value false is returned in the return of the query function of a screen, the autocompletion of public properties fails.
To Reproduce
Create a new Screen class extending App\Orchid\Screens\BaseScreen
use Orchid\Screen\Screen as Screen;
class DemoScreen extends BaseScreen
Declare 3 public properties in the class
public $var1 = null;
public $var2 = null;
public $var3 = null;
Define the query function by returning an array with 3 keys corresponding to the names of the three properties, as described in the documentation.
The first element of the array must be a Boolean value false.
The elements after the first can be any value.
public function query(Request $request): array
{
return [
'var1' => false,
'var2' => "example1",
'var3' => "example2"
];
}
Define the layout function by printing the value of $this->var2
public function layout(): array
{
dd($this->var2);
}
Check the printed output, it will be "null" or the default value of the var2 variable.
Expected behavior
string "example1" is expected.
Screenshots
Server (please complete the following information):
Platfrom Version: 14.17.0
Laravel Version: 10.38.0
PHP Version: 8.1
Additional context
If the array returning from query function contains a boolean false value, the Autocompleting Public Properties does not work and values are not set to public properties.
The text was updated successfully, but these errors were encountered:
Describe the bug
If an item with the Boolean value false is returned in the return of the query function of a screen, the autocompletion of public properties fails.
To Reproduce
The first element of the array must be a Boolean value false.
The elements after the first can be any value.
Expected behavior
string "example1" is expected.
Screenshots
Server (please complete the following information):
Additional context
If the array returning from query function contains a boolean false value, the Autocompleting Public Properties does not work and values are not set to public properties.
The text was updated successfully, but these errors were encountered: