Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroron on load #40

Open
systematicanet opened this issue Sep 14, 2021 · 1 comment
Open

Erroron on load #40

systematicanet opened this issue Sep 14, 2021 · 1 comment

Comments

@systematicanet
Copy link

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)

@systematicanet
Copy link
Author

systematicanet commented Sep 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant