I'm rather new to the whole Elm thing, so please bare with me.
The fact that the tabs trigger a selected index message is IMO a source of over-complexifying most of the MDL layouts. If you have only one tab bar, it's easy and fun. But if you have as many tab bars as you have contexts (Eg General Page has 3 tabs Home, Contact, About. Dashboard Page has tabs Profile and Friends, etc).
A very good addition to elm-mdl would probably be a way to have a onSelect action assigned to each tab, to remove the need of mapping from / to Int indices eg:
view model =
Layout.render Mat
model.mdl
[ ... ]
{ header = ...
, drawer = ...
, tabs = ( [ Tab.item [onClick (NavMsg (GeneralPage Home))] [ text "Home" ] ], [] )
, main = ...
}
Again, I'm pretty new to this, so if I missed something feel free to close this enhancement request issue.
I'm rather new to the whole Elm thing, so please bare with me.
The fact that the tabs trigger a selected index message is IMO a source of over-complexifying most of the MDL layouts. If you have only one tab bar, it's easy and fun. But if you have as many tab bars as you have contexts (Eg General Page has 3 tabs Home, Contact, About. Dashboard Page has tabs Profile and Friends, etc).
A very good addition to
elm-mdl
would probably be a way to have aonSelect
action assigned to each tab, to remove the need of mapping from / toInt
indices eg:Again, I'm pretty new to this, so if I missed something feel free to close this enhancement request issue.