Browse Source

update session on request value change

PHP-GTK3
yggverse 5 months ago
parent
commit
6d2096be7e
  1. 22
      src/Entity/Browser/Container/Page/Navbar/Request.php

22
src/Entity/Browser/Container/Page/Navbar/Request.php

@ -16,7 +16,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
$entry->get_text() $entry->get_text()
); );
$this->navbar->page->container->tab->updateSession(); // @TODO async page update $this->navbar->page->container->tab->updateSession();
} }
protected function _onKeyRelease( protected function _onKeyRelease(
@ -28,4 +28,24 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
$this->navbar->page->container->tab->updateSession(); $this->navbar->page->container->tab->updateSession();
} }
// Update setter with session update feature
public function setValue(
?string $value = null
): void
{
$this->gtk->set_text(
is_null($value) ? $this->_value : trim(
strval(
$value
)
)
);
// Update session on tab initiated only
if (isset($this->navbar->page->container->tab))
{
$this->navbar->page->container->tab->updateSession();
}
}
} }
Loading…
Cancel
Save