reflex-dom-0.2: Functional Reactive Web Apps with Reflex

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Widget.Lazy

Synopsis

Documentation

virtualListWithSelection Source

Arguments

:: (MonadWidget t m, Ord k) 
=> Int

The height of the visible region in pixels

-> Int

The height of each row in pixels

-> Dynamic t Int

The total number of items

-> Int

The index of the row to scroll to on initialization

-> Event t Int

An Event containing a row index. Used to scroll to the given index.

-> String

The element tag for the list

-> Dynamic t (Map String String)

The attributes of the list

-> String

The element tag for a row

-> Dynamic t (Map String String)

The attributes of each row

-> (k -> Dynamic t v -> m ())

The row child element builder

-> Dynamic t (Map k v)

The Map of items

-> m (Dynamic t (Int, Int), Event t k)

A tuple containing: a Dynamic of the index (based on the current scroll position) and number of items currently being rendered, and an Event of the selected key

A list view for long lists. Creates a scrollable element and only renders child row elements near the current scroll position.