Skip to content

Allow other/multiple rightBarButtonItems - #73

Open
pardeyke wants to merge 1 commit into
joemasilotti:mainfrom
pardeyke:main
Open

Allow other/multiple rightBarButtonItems#73
pardeyke wants to merge 1 commit into
joemasilotti:mainfrom
pardeyke:main

Conversation

@pardeyke

Copy link
Copy Markdown

Override rightBarButtonItem (singular) with rightBarButtonItems (plural) to prevent wiping other bar button items added by sibling components. Manages its own button reference to avoid duplicates on page refresh.

@joemasilotti

Copy link
Copy Markdown
Owner

What sibling components are adding buttons? Can you explain that a bit more?

@pardeyke

Copy link
Copy Markdown
Author

When there is another component that has already added a rightBarButtonItem and then this component adds its button via rightBarButtonItem the first button is removed. If both components use rightBarButtonItems (plural) they both persist.

Simulator Screenshot - iPhone 17 Pro - 2026-03-23 at 21 20 02

Btw the search button is a modified version of your SearchComponent 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants