Module
Specular.FRP.List
- Package
- purescript-specular
- Repository
- restaumatic/purescript-specular
#dynamicListWithIndex Source
dynamicListWithIndex :: forall m a b. MonadFRP m => MonadReplace m => Dynamic (Array a) -> (Int -> Dynamic a -> m b) -> m (Dynamic (Array b))
dynamicListWithIndex dynArray handler
Render a list of items from dynArray
. Each item will be rendered by handler
.
When the array changes, indexes that exist in both old and new array are updated,
e.g. the Dynamics passed to handlers are changed. As an optimization,
when old and new item values are the same JS object (using ===
), the
Dynamic is not updated.
If the array grows (a new index appears), a new handler is invoked.
The resulting Dynamic represents return values from all the handlers.
#dynamicList Source
dynamicList :: forall m a b. MonadFRP m => MonadReplace m => Dynamic (Array a) -> (Dynamic a -> m b) -> m (Dynamic (Array b))
#dynamicListWithIndex_ Source
dynamicListWithIndex_ :: forall m a. MonadFRP m => MonadReplace m => Dynamic (Array a) -> (Int -> Dynamic a -> m Unit) -> m Unit
#dynamicList_ Source
dynamicList_ :: forall m a. MonadFRP m => MonadReplace m => Dynamic (Array a) -> (Dynamic a -> m Unit) -> m Unit
#weakDynamicListWithIndex Source
weakDynamicListWithIndex :: forall m a b. MonadFRP m => MonadReplace m => WeakDynamic (Array a) -> (Int -> WeakDynamic a -> m b) -> m (WeakDynamic (Array b))
Like listWithIndex
, but operates on WeakDynamics
.
#weakDynamicList Source
weakDynamicList :: forall m a b. MonadFRP m => MonadReplace m => WeakDynamic (Array a) -> (WeakDynamic a -> m b) -> m (WeakDynamic (Array b))
#weakDynamicListWithIndex_ Source
weakDynamicListWithIndex_ :: forall m a. MonadFRP m => MonadReplace m => WeakDynamic (Array a) -> (Int -> WeakDynamic a -> m Unit) -> m Unit
#weakDynamicList_ Source
weakDynamicList_ :: forall m a. MonadFRP m => MonadReplace m => WeakDynamic (Array a) -> (WeakDynamic a -> m Unit) -> m Unit
- Modules
- Control.
Monad. Cleanup - Control.
Monad. Replace - Specular.
Debug - Specular.
Dom. Browser - Specular.
Dom. Builder - Specular.
Dom. Builder. Class - Specular.
Dom. Element - Specular.
Dom. Element. Class - Specular.
Dom. Node. Class - Specular.
Dom. Widget - Specular.
Dom. Widgets. Button - Specular.
Dom. Widgets. Input - Specular.
Dom. Widgets. RadioGroup - Specular.
Dom. Widgets. Select - Specular.
FRP - Specular.
FRP. Async - Specular.
FRP. Base - Specular.
FRP. Fix - Specular.
FRP. List - Specular.
FRP. Replaceable - Specular.
FRP. WeakDynamic - Specular.
Internal. Effect - Specular.
Internal. Incremental - Specular.
Internal. Incremental. Array - Specular.
Internal. Incremental. Effect - Specular.
Internal. Incremental. Global - Specular.
Internal. Incremental. Mutable - Specular.
Internal. Incremental. MutableArray - Specular.
Internal. Incremental. Node - Specular.
Internal. Incremental. Optional - Specular.
Internal. Incremental. PriorityQueue - Specular.
Internal. Incremental. Ref - Specular.
Internal. Profiling - Specular.
Internal. Queue - Specular.
Internal. RIO - Specular.
Profiling - Specular.
Ref