open-admin
open-admin copied to clipboard
Error when using Addlink of Tab Widgets
Describe the bug refs #51
Error when using Addlink of Tab Widgets.
To Reproduce
public function index(Content $content): Content
{
$tab = new Tab();
$tab->addLink('1', 'A', false);
$tab->addLink('2', 'B', false);
$tab->addLink('3', 'C', true);
return $content->row($tab);
}
public function index(Content $content): Content
{
$tab = new Tab();
$tab->add('1', 'A', false);
$tab->addLink('2', 'B', false);
$tab->addLink('3', 'C', true);
return $content->row($tab);
}
In the Tab class, href or ref is put in the $this->data['tabs'] depending on the type, but there is always a place where ref is called in the view.
https://github.com/open-admin-org/open-admin/blob/v1.0.27/src/Widgets/Tab.php#L76-L81 https://github.com/open-admin-org/open-admin/blob/v1.0.27/resources/views/widgets/tab.blade.php#L30-L32
Expected behavior
No error when using addLink.
System
- Open-admin version
- PHP version
- PHP/8.2.3
- Laravel Version
- 10.1.5
- OS:
- Linux
- Browser
- chrome
@hrs-o thanks for reporting (sorry for introducting a new bug with the last fix). Will be fixed in the next release. dev-develop branch already has the fix.