Event handlers on main content area of Layout
Opened this issue · 1 comments
dalen commented
I would like to add a onScroll event handler to the main content area to make a "infinite scrolling" style app. But it seems like it isn't possible to add any event handlers to the main area.
I guess the type of Contents
would need to change from
type alias Contents m =
{ header : List (Html m)
, drawer : List (Html m)
, tabs : (List (Html m), List (Style m))
, main : List (Html m)
}
to something like
type alias Contents m =
{ header : List (Html m)
, drawer : List (Html m)
, tabs : (List (Html m), List (Style m))
, main : (List (Property c m), List (Html m))
}
Would that be okay for you? Should I create a PR with that sort of API? Or do you think some other API would be better? Like adding a renderWithProperties
function or something to avoid doing a API change?
dalen commented
I suppose another option would be to add a Material.Layout.Property
, mainProperties
that would take a List
of Material.Options.Property