it seems that value of ALL public properties of Screen is changed after query() call.
Even if this property is not changed in query()
Compare values in query() and Save
class MyScreen extends Screen
{
protected $protected_property = 'Some protected value';
public $public_property = 'Some public value';
public function query($id = null): iterable
{
echo $this->protected_property; // 'Some protected value'
echo $this->public_property; // 'Some public value'
return [];
}
public function layout(): iterable
{
return [Layout::rows([
Button::make('Кнопка')->method('Save')
])];
}
public function Save()
{
echo $this->protected_property; // 'Some protected value'
echo $this->public_property; // null. WTF?!
}
it seems that value of ALL public properties of Screen is changed after query() call. Even if this property is not changed in query() Compare values in query() and Save