Closed skalero01 closed 3 years ago
Hi @skalero01
I would say that the reason is your condition. Try console.log('App\Models\Course')
it will return AppModelsCourse
because \
is considered to be an escaping symbol. In order to put slash you should use \\
, i.e. try data-condition="priceable_type=='App\\Models\\Course'"
Didnt work neither
Tried again on my side and it works. Can you provide a non-working codepen (or something similar)? Here is my code:
<body>
<div class="col-sm-12">
<div class="form-group">
<label class="form-label">Precio De Tipo</label>
<select name="priceable_type" class="form-control">
<option value="">Seleccionar opción</option>
<option value="App\Models\Course" selected="selected">Curso</option>
<option value="App\Models\Product">Producto</option>
</select>
</div>
</div>
<div data-condition="priceable_type==='App\\Models\\Course'">
Access
</div>
<script>
$('[data-condition]').conditionize();
</script>
</body>
@skalero01 so, did it work?
Apparently this doesnt work
Or it works on your side? I am using 2.0.1 version on the cdn