Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- virtualListWithSelection :: 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 -> Int -> Dynamic t Int -> Int -> Event t Int -> Text -> Dynamic t (Map Text Text) -> Text -> Dynamic t (Map Text Text) -> (k -> Dynamic t (Maybe v) -> Dynamic t Bool -> m ()) -> Dynamic t (Map k v) -> (Int -> k) -> m (Dynamic t (Int, Int), Event t k)
- virtualList :: 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 -> 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 (Dynamic t (Int, Int), Dynamic t (Map k a))
- 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))
Documentation
virtualListWithSelection Source #
:: (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 |
-> 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 |
-> (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 |
A list view for long lists. Creates a scrollable element and only renders child row elements near the current scroll position.
:: (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 |
-> Int | The fixed height of each row in pixels |
-> Dynamic t Int | A |
-> Int | The index of the row to scroll to on initialization |
-> Event t Int | An |
-> (k -> Int) | Key to Index function, used to position items. |
-> Map k v | The initial |
-> Event t (Map k (Maybe v)) | The update |
-> (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 |
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 #