Events listeners for Nativescript UI Elements
Listen for blur
Listen for busyChange
Listen for dateChange
Method values are kept under {custom: {[methodName]: value}} We will improve this in future
For example:
Event.onEventWithMethodCalls "touch"
{ methodCalls = [ "getX", "getY" ]
, setters = []
, getters = []
}
(D.map2 Tuple.pair
(D.at [ "custom", "getX" ] D.float)
(D.at [ "custom", "getY" ] D.float)
|> D.map Msg
)Listen for focus
Listen for itemTap in listView
Listen for loaded
Listen for returnPress
Listens for selectedIndexChange
Listen for tap
Listens for textChange event
Listen for unloaded
Listen for valueChange
Allows you to decode attributes from nativescript object
Usage:
listViewWithSingleTemplate
[ items listViewModel ]
[ button
[ bindAttributeWithExpression "item-id" "$value.id"
, on "tap" (Event.decodeAttribute "itemId" D.string |> D.map ItemTap)
]
[]
]
Allows you to build your own events and decoders