This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
Dispatch multiple messages in response to a single Html.Event.
version 1.0.1
license Apache-2.0
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.1
Committed At 2017-02-23 13:46:17 UTC
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

elm-dispatch

Dispatch multiple messages in response to a single Html.Event.

UI libraries in elm sometimes need to perform internal actions on Html.Events such as onFocus, while at the same time allowing library users to also respond to those events. This library provides such multiple dispatch.

Motivation

The library was developed for the purpose of allowing elm-mdl to have stateful components such as Textfield which also allow user provided event-handlers.

Textfield requires some internal state management on onFocus and onBlur events. However, users may also want to have event-handlers for those particular events and this is where Dispatch helps.

Install

elm package install vipentti/elm-dispatch

Example

An example of how to use the library may be found in the examples/ folder.

The library can also been seen in use in elm-mdl specifically Material.Options.Internal and Material.Options.

License

© Ville Penttinen, 2016. Licensed under an Apache-2.0 license.