1module Element.Keyed exposing (el, column, row)
3{-| Notes from the `Html.Keyed` on how keyed works:
7A keyed node helps optimize cases where children are getting added, moved, removed, etc. Common examples include:
9 - The user can delete items from a list.
10 - The user can create new items in a list.
11 - You can sort a list based on name or date or whatever.
13When you use a keyed node, every child is paired with a string identifier. This makes it possible for the underlying diffing algorithm to reuse nodes more efficiently.
15This means if a key is changed between renders, then the diffing step will be skipped and the node will be forced to rerender.
23import Element exposing (Attribute, Element, fill, height, shrink, width)
24import Internal.Model as Internal
25import Internal.Style exposing (classes)
29el : List (Attribute msg) -> ( String, Element msg ) -> Element msg
38 (Internal.Keyed [ child ])
42row : List (Attribute msg) -> List ( String, Element msg ) -> Element msg
47 (Internal.htmlClass (classes.contentLeft ++ " " ++ classes.contentCenterY)
52 (Internal.Keyed children)
56column : List (Attribute msg) -> List ( String, Element msg ) -> Element msg
57column attrs children =
64 ++ classes.contentLeft
70 (Internal.Keyed children)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list