Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

[1.0.2] issues w/ #selectionBar #68

Closed
robrez opened this issue Jun 11, 2015 · 3 comments
Closed

[1.0.2] issues w/ #selectionBar #68

robrez opened this issue Jun 11, 2015 · 3 comments

Comments

@robrez
Copy link

robrez commented Jun 11, 2015

I'm migrating some code from 0.5.2 to 1.0.2 and am seeing some inconsistent behavior out of my paper-tabs. #selectionBar can go missing and the trouble seems to relate to the fact that I'm hiding the paper-tabs in certain situations.

My original code used a conditional template to swap out toolbars (one of which contains the tabs) whenever certain pages are selected. I tried to work-around the problems by using a conditional hidden$ attribute instead of a dom-if.

My general setup is that I've bound a set of paper-tabs and neon-animated-pages to a selected property:

    properties: {
      selected: {
        type: Number,
        value: 0,
        notify: true
      }
    }
<paper-tabs id="tabs" selected="{{selected}}">
...
<neon-animated-pages selected="{{selected}}">
  <blah-inbox/>
  <blah-outbox/>
  <blah-compose/>
</neon-animated-pages>

When pages 1 or 2 (inbox, outbox) are selected, the toolbar containing the tabs is visible. When page 3 (compose) is selected (by clicking the create icon), I replace the toolbar w/ one that is context-appropriate for that page's function. The 3rd pages toolbar has a declarative on-tap event that changes selected back to one of the other pages...

    showPreviousPage: function() {
      this.set('selected', 0);   //previously tried `this.selected = 0;`
    },

Note: The correct page is always being displayed.
These numbered items correspond to the image below:

  1. initial state: selected = 0, tab displays correctly
  2. this is how things look after showPreviousPage sets selected back to 0.
  3. clicking "Sent" (selected = 1), #selectionBar is still missing

tabs

Clicking back on "Inbox" (selected = 0) does get everything back to a correct looing state (like figure 1).

@notwaldorf
Copy link

I thiiiiiiink @cdata just fixed this for 1.0 with PolymerElements/paper-tabs#33. Would you mind checking if that fix works for you? Thanks!

@robrez
Copy link
Author

robrez commented Jun 11, 2015

:( No dice for me. I'll see if I can puzzle out any more details.

(Just realized I posted this in Polymer/paper-tabs instead of PolymerElements/paper-tabs... Oops!).

@robrez
Copy link
Author

robrez commented Jun 12, 2015

Closing. Moved the issue to PolymerElements/paper-tabs where I've provided a simpler duplication path and some additional findings.

@robrez robrez closed this as completed Jun 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants