Fix: pendingSelections sync and chips toolbar display
1. Fix Select All not persisting in list view: - Updated Select All handler to populate pendingSelections array - Updated Clear selection handler to clear pendingSelections for list view - Updated dropdown item click to add/remove from pendingSelections - Updated chip remove handler to filter pendingSelections 2. Fix chips toolbar (search/delete all) not showing: - PHP renderer was pre-creating chips-wrapper without toolbar - JS ensureChipsWrapper was skipping because wrapper existed - Removed wrapper from PHP so JS creates complete wrapper with toolbar Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1047,9 +1047,8 @@ class EntitySelectorRenderer
|
||||
switch ($valueType) {
|
||||
case 'entity_search':
|
||||
$noItemsPlaceholder = $this->trans('No items selected - use search below');
|
||||
$html .= '<div class="chips-wrapper">';
|
||||
// Don't pre-wrap chips - JS will create the wrapper with toolbar when chips are added
|
||||
$html .= '<div class="entity-chips ' . $chipsClass . '" data-placeholder="' . $this->escapeAttr($noItemsPlaceholder) . '"></div>';
|
||||
$html .= '</div>';
|
||||
$html .= '<div class="entity-search-box">';
|
||||
$html .= '<i class="icon-search entity-search-icon"></i>';
|
||||
$html .= '<input type="text" class="entity-search-input" placeholder="' . $this->trans('Search by name, reference, ID...') . '" autocomplete="off">';
|
||||
|
||||
Reference in New Issue
Block a user