Skip to content

Commit

Permalink
enable use of existing menu for Grid (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehristov authored Feb 18, 2020
1 parent cf81ee7 commit 3e6d8e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public function init()
$this->sortTrigger = $this->name.'_sort';
}

if ($this->menu !== false) {
// if menu not disabled ot not already assigned as existing object
if ($this->menu !== false && !is_object($this->menu)) {
$this->menu = $this->add($this->factory(['Menu', 'activate_on_click' => false], $this->menu, 'atk4\ui'), 'Menu');
}

Expand Down

0 comments on commit 3e6d8e5

Please sign in to comment.