headsvk
headsvk

Reputation: 2796

Scroll header panel inside scaffold

is there a way to use core-scroll-panel inside core-scaffold?

This doesn't work, core-menu won't be displayed at all.

<core-scaffold>
  <core-scroll-header-panel navigation flex>
    <core-menu>...</core-menu>
  </core-scroll-header-panel>
</core-scaffold>

I also tried edditing core-scaffold template element to use core-scroll-header-panel doesn't work either. Thanks

Upvotes: 1

Views: 532

Answers (1)

DocDude
DocDude

Reputation: 2873

You need a content attribute or content class on the core-menu to make it appear in the main content area of the core-scroll-header-panel:

https://www.polymer-project.org/docs/elements/core-elements.html#core-scroll-header-panel

Example: http://jsbin.com/neror/3/edit

This is a little confusing, because it's different from core-header-panel, which places any unassigned children into the main content area. This seems like it's probably a bug.

If you don't need the extra-fancy scrolling effects, you could use a plain core-header-panel in your navigation drawer.

Upvotes: 1

Related Questions