Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppLayout should allow you to implement onChange functions #1054

Open
adriantadros opened this issue Nov 18, 2024 · 0 comments
Open

AppLayout should allow you to implement onChange functions #1054

adriantadros opened this issue Nov 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@adriantadros
Copy link

Currently, when you use the AppLayout component in northstar, there is no way to implement onChange events like onToolsChange or onNavigationChange.

I'm using northstar AppLayout in a project and want to run some custom logic when the user shows and hides the slide out help panel. There is an attribute in the cloudscape AppLayout component that allows you to do this, however, the northstar AppLayout does not give you the option.

E.g. I want to do something like this:

<AppLayout onToolsChange={() => myCustomFunction()} />

The current northstar AppLayout code implements:

onToolsChange={({ detail }) => setToolsOpen(detail.open)}

It would be ideal if it could also run an optional user defined onToolsChange code, e.g.

onToolsChange={({ detail }) => { setToolsOpen(detail.open); props.onToolsChange({ detail }) }}

The same applies for the other onChange events like:

onToolsChange
onNavigationChange
onSplitPanelToggle
onSplitPanelResize
onSplitPanelPreferencesChange
@adriantadros adriantadros added the enhancement New feature or request label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant