Stages Demos:

[ Note: Stages comes without styles, you have to bring your own! ]

Typecasting

Ideally you always want the right kind of type in the data you receive from Stages. However, sometimes you work with 3rd party fields which use a different type. You can solve this problem in Stages with Typecasting.

In this first example, our component creates a boolean, but our backend API expects "yes" and "no" strings. We use custom typecasting to solve this. Check the data in the debugger where the correct type (and value) is set.

path: mybool | type: checkbox

In this next example, we have a field which returns a string which looke like "2022-08-23". But our JavaScript code which receives the data expects a Date object. So we typecast it. Check the code of this example to get an idea how.

path: mydate | type: date


- - -
(c) 2023 by Fredi Bach : Unic : Github