reflex-dom-core-0.6.0.0: Functional Reactive Web Apps with Reflex
Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Widget.Lazy

Synopsis

Documentation

virtualListWithSelection Source #

Arguments

:: forall t m k v. (DomBuilder t m, PostBuild t m, MonadHold t m, PerformEvent t m, MonadJSM (Performable m), DomBuilderSpace m ~ GhcjsDomSpace, MonadFix m, Ord k) 
=> Dynamic t 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.

-> Text

The element tag for the list

-> Dynamic t (Map Text Text)

The attributes of the list

-> Text

The element tag for a row

-> Dynamic t (Map Text Text)

The attributes of each row

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

The row child element builder

-> Dynamic t (Map k v)

The Map of items

-> (Int -> k)

Index to Key function, used to determine position of Map elements

-> 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.

virtualList Source #

Arguments

:: forall t m k v a. (DomBuilder t m, PostBuild t m, MonadHold t m, PerformEvent t m, MonadJSM (Performable m), DomBuilderSpace m ~ GhcjsDomSpace, MonadFix m, Ord k) 
=> Dynamic t Int

A Dynamic of the visible region's height in pixels

-> Int

The fixed height of each row in pixels

-> Dynamic t Int

A Dynamic of 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.

-> (k -> Int)

Key to Index function, used to position items.

-> Map k v

The initial Map of items

-> Event t (Map k (Maybe v))

The update Event. Nothing values are removed from the list and Just values are added or updated.

-> (k -> v -> Event t v -> m a)

The row child element builder.

-> m (Dynamic t (Int, Int), Dynamic t (Map k a))

A tuple containing: a Dynamic of the index (based on the current scroll position) and number of items currently being rendered, and the Dynamic list result

virtualListBuffered :: (DomBuilder t m, PostBuild t m, MonadHold t m, PerformEvent t m, MonadJSM (Performable m), DomBuilderSpace m ~ GhcjsDomSpace, MonadFix m, Ord k) => Int -> Dynamic t Int -> Int -> Dynamic t Int -> Int -> Event t Int -> (k -> Int) -> Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Event t (Int, Int), Dynamic t (Map k a)) Source #