design-system-react icon indicating copy to clipboard operation
design-system-react copied to clipboard

App Launcher section expand/collapse optional

Open swilliamset opened this issue 10 years ago • 4 comments

In the instance there is only one section to show expand/collapse is unnecessary

https://github.com/salesforce-ux/design-system-react/blob/master/components/app-launcher/section.jsx#L97-L103

swilliamset avatar Aug 03 '16 16:08 swilliamset

I guess we could do a check on the number of children. Make sure they are sections though to future proof it.

interactivellama avatar Aug 03 '16 18:08 interactivellama

children ?= sections

swilliamset avatar Aug 03 '16 18:08 swilliamset

Yep.

<AppLauncher
                        triggerName="App Name"
                        onSearch={this.onSearch}
                        isOpen={this.state.appLauncherOpen}
                        triggerOnClick={this.toggleAppLauncher}
                        onClose={this.toggleAppLauncher}
                    >
                        <AppLauncherSection
                            title="All Items"
                            isOpen={this.state.allItemsSectionIsOpen}
                            onToggleClick={this.toggleSection}
                        >
                            <DemoAppLauncherTile search={this.state.search} />
                            <DemoAppLauncherTileWithIconNode search={this.state.search} />
                            <DemoAppLauncherTileWithIconText search={this.state.search} />
                        </AppLauncherSection>
                        <AppLauncherSection title="All Apps">
                            <DemoAppLauncherTile search={this.state.search} />
                            <DemoAppLauncherTileWithTruncatedText search={this.state.search} />
                        </AppLauncherSection>
                    </AppLauncher>

interactivellama avatar Aug 03 '16 18:08 interactivellama

cool that would do it

swilliamset avatar Aug 03 '16 19:08 swilliamset