Open systematicanet opened 3 years ago
this is my code
selectmacroaree.py
class SelectMacroaree(Component):
def __init__(self, id=None, **kwargs):
super().__init__(id=id, **kwargs)
self.selezionato = kwargs.get('value', '0')
myresult = listaMacroAreeDict()
myresult.insert(0,{'id':0, 'text':'Tutte'})
self.macroaree = myresult
def set_macroarea(self):
print(self.selezionato)
selectmacroaree.html
<div>
<label for="selectmacroaree">Macroaree</label>
<select meld:model.prevent="selezionato" meld:click="set_macroarea" class="uk-select" id="selectmacroaree" name="selectmacroaree" >
{% for macro in macroaree %}
<option value="{{ macro.id|trim }}">{{ macro.text }}</option>
{% endfor %}
</select>
</div>
set_macroarea doesn't work
Updated to the last flask-meld with pip. I have this error on loading of a page using meld component
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
And then I'm not able to have a component working (with a previous version it work)