Dynamic Attribute "Show" with a variable doesn't work

Wappler Version : 3.0 rc3
Operating System : Mac OS Catalina

Expected behavior

What do you think should happen?

When I press the blue button the variable is transformed to 1 and shows a column that contains a hidden title with a green ok message.

Actual behavior

What actually happens?

Doesn’t show the column

Hi, I found an error where the “Show” code doesn’t work.
On a blank doc I put together a small test to show the problem.

The problem is in the new code that wappler generates:

Before:

<dmx-show = "show_cita_calend.value == 1">

Now:

<dmx-show="(show_cita_calend.value == &quot;'1'&quot;)">

The second is the one with the modifications and does not work.

Grabación de pantalla 2020-06-23 a la(s) 16.07.22

Here is my code:

   <!doctype html>
<html>

<head>
	<meta name="ac:base" content="/test">
	<base href="/test/">
	<script src="dmxAppConnect/dmxAppConnect.js"></script>
	<meta charset="UTF-8">
	<title>Untitled Document</title>
	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" />
	<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js" integrity="sha256-CutOzxCRucUsn6C6TcEYsauvvYilEniTXldPa6/wu0k=" crossorigin="anonymous"></script>
	<script src="dmxAppConnect/dmxFormatter/dmxFormatter.js" defer=""></script>
</head>

<body is="dmx-app" id="">
	<dmx-value id="var1" dmx-bind:value="'0'"></dmx-value>
	<div class="container mt-5">
		<div class="row">
			<div class="col">
				<button id="btn1" class="btn btn-block btn-primary btn-lg" dmx-on:click="var1.setValue('1')">TEST</button>
				<h1 class="text-center mt-5">VARIABLE IS: {{var1.value}}</h1>
			</div>
			<div class="col" dmx-show="(var1.value == 1)">
				<h1 class="text-center text-success"><i class="fa fa-check"></i></h1>
			</div>
		</div>
	</div>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>

</html>

This has been reported already. Just remove the single quotes from the expression and it will work.

To paste code wrap it in three back ticks. ``` before and after your code.

1 Like

This issue has been reported and will be fixed in the next update.
For the code formatting:

1 Like

Hi Brad yes as u can see in the video i did that, but I didn’t see that it had already been reported. Thanks

1 Like