-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix selection behavior for polymer 1.0 #75
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ wrapbehavior(w::IconButton) = | |
clickable(w, name=w.name) | ||
|
||
|
||
abstract Selection <: Widget | ||
abstract Selection <: Widget | ||
|
||
@api pages => (Pages <: Selection) begin #FIXME: Why is this a widget? | ||
doc("A set of pages. Only one selected page will be visible at any given time.") | ||
|
@@ -67,7 +67,7 @@ end | |
|
||
render(ps::Pages, state) = | ||
Elem("iron-pages", | ||
map(t -> Elem("section", render(t, state)), ps.pages.tiles), | ||
map(t -> Elem("div", render(t, state)), ps.pages.tiles), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why was this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not required, the current docs for iron-pages indicate that these should be divs. I'd assume that selection would work, but I went with consistency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I guess that's fine. |
||
attributes = @d(:selected=>ps.selected-1)) | ||
|
||
@api tabs => (Tabs <: Selection) begin | ||
|
@@ -225,4 +225,3 @@ render(dm::DropdownMenu, state) = begin | |
) | ||
end | ||
wrapbehavior(d::DropdownMenu) = selectable(d, name=d.name, selector=".dropdown-content") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right way to fix this is to change this line to
:multi=>boolattr(t.multi)
right here. moving it out from attributes will cause updates to not trigger "multi-changed" event (assuming there is one).