Skip to content

Commit 2abe0e1

Browse files
committed
Prevent exception when grid namespace doesn't have bookmark record
1 parent 4a7b13e commit 2abe0e1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Grid/State.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ public function setFilters(array $filters): void
211211

212212
public function getActiveColumns(): array
213213
{
214-
$bookmarkData = $this->getBookmarkData();
214+
try {
215+
$bookmarkData = $this->getBookmarkData();
216+
} catch(NoSuchEntityException $e) {
217+
return [];
218+
}
219+
215220
if (false === is_array($bookmarkData['columns'])) {
216221
return [];
217222
}

view/adminhtml/templates/grid/view-selector.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<li class="action-dropdown-menu-action action-dropdown-menu-item-last" style="display: none;">
1313
<a href="">Save View As...</a>
1414
<div class="action-dropdown-menu-item-edit" style="display: none;">
15-
<input class="admin__control-text" type="text" aria-label="New View">
15+
<input id="new-view" class="admin__control-text" type="text" aria-label="New View">
1616
<div class="action-dropdown-menu-item-actions">
1717
<button class="action-submit" type="button" title="Save all changes">
1818
<span>Submit</span>

0 commit comments

Comments
 (0)