3

I try to use Web Components in Reflex. Code is as such:

buttonUI5 :: DomBuilder t m => T.Text -> m (Event t ())
buttonUI5 t = do
  (e, _) <- element "ui5-button" def $ text t
  return $ domEvent Click e

For ui5-button it worked as expected. Other Web Components fire events not defined in Reflex.Dom.Widget.Basic like "liveChange".

How can I translate these into Reflex Events?

5
  • What's 'liveChange'? For Reflex.Dom.Widget.Input.TextInput areas, the textInput_input field is an event which fires on changes to the text area input. Is this what like you are looking for? Commented Feb 25, 2019 at 15:11
  • Also, as you probably know, Widget.Dom.Builder.Class.Events lists many types of events covered by reflex. If the events you are looking for are not handled there, im not sure I could help you. But if you add a little more detail to this question you might have better chances. Commented Feb 25, 2019 at 15:15
  • I refer to the Web Components to be found here: https://github.com/SAP/ui5-webcomponents There are several of examples for events of these components that cannot be found in Widget.Dom.Builder.Class.Events. I try to find a way to transform these into Reflex events. Commented Feb 25, 2019 at 18:48
  • Markus, thats still a bit general. After a few clicks from that page I can find the API documentation, with a lot of components that have reflex corollaries. For instance TextArea has a "change" event listener and reflex has a change event--which is why i mentioned the reflex TextArea event. I couldn't find any "liveChange". Also, in that API, button only has the "Press" event, which may be why "Click" works but other events don't. Have you tried "Change" with ui5-textarea? But again, without a specific example of something which doesn't work its hard for anybody to supply a solution. Commented Feb 25, 2019 at 20:21
  • Trevor, maybe I'm too ambitious. You are right. The events that map are completely sufficient for the PoC I'm doing. I was just wondering if I was interested in some specific event in the WebComponents lib like liveChange in (sap.github.io/ui5-webcomponents/playground.html#/components/…) how I can include them as well. Commented Feb 26, 2019 at 9:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.