Skip to content

Commit

Permalink
Fixed #14320
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 7, 2024
1 parent ea5fa4d commit 8610a81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fixed a bug where element actions weren’t working for elements that were added to a relational field.
- Fixed a bug where very wide tables could bleed off the page.
- Fixed an error that occurred when activating a new user. ([#14316](https://github.com/craftcms/cms/issues/14316))
- Fixed a bug where newly-added components could be selected multiple times by component selects. ([#14320](https://github.com/craftcms/cms/issues/14320))

## 5.0.0-alpha.13 - 2024-02-06

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/web/assets/cp/src/js/ComponentSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ Craft.ComponentSelectInput = Garnish.Base.extend(

if (addToMenu && disclosureMenu) {
const $menuItem = $(data.menuItems[type][id]);
disclosureMenu.addItem($menuItem);
if (canAdd) {
$menuItem.addClass('hidden');
disclosureMenu.hideItem($menuItem.children()[0]);
}
disclosureMenu.addItem($menuItem);
this.addListener($menuItem.find('button'), 'activate', () => {
this.addComponent(type, id);
});
Expand Down

0 comments on commit 8610a81

Please sign in to comment.