ZupIT/beagle

[iOS] Operation: "condition"

tatianesilvazup opened this issue · 1 comments

The condition with one of the parameters of type .empty returns neither onTrue nor onFalse, it returns nil.

Description

When, for example, I validate if a parameter is null to change a text field. The condition with one of the parameters of type .empty returns neither onTrue nor onFalse, iOS implementation of the "condition" returns nil.

{
  "_beagleComponent_": "beagle:text",
  "text": "@{condition(isNull(response.name), '-', response.name)}"
}

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Do a request
  2. Validate if a response parameter is null
  3. Use condition operation to return parameter value or a default

Expected Results

if null, return a default value in the condition operation

Code example, screenshot, or link to a repository:

Beagle code - version 1.10.1
Captura de Tela 2022-03-07 às 16 00 25

👋 @tatianesilvazup
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible and that you have followed our contributing guidelines.
We will review it as soon as possible.