Skip to content

AppLayout should allow you to implement onChange functions #1054

Description

@adriantadros

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions