CreativeIT / getmdl-select

Select for material-design-lite
http://creativeit.github.io/getmdl-select/
MIT License
301 stars 87 forks source link

This is not a real select, problem with not defered loading #28

Closed torian257x closed 8 years ago

torian257x commented 8 years ago

a select has an option value and an option label

this select has only an option label

so i wont use it.

But anyway:

there was errors when loading your script. They only occurred when loading radio boxes as well and hovering over them:

http://imageshack.com/i/pmRbMovdp

i could fix it by loading the scripts like this:

    <script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
    <script defer src="/js/mdl-select/getmdl-select.min.js"></script>

this way i would get errors:


    <script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
    <script src="/js/mdl-select/getmdl-select.min.js"></script>

would cause the errors (note, the mdl select script is loaded from localhost). i could not reproduce with codepen, maybe because the mdl-select script eventually ends up loading faster

franckevva commented 8 years ago

Hi, @Jossnaz ! Can you formulate once more what you want to that we make? I don't catch your idea. This select has option value.

About defer. Of course, this will only work in the first variant. The script will be executed after material.js.

torian257x commented 8 years ago

defer: well, then fix your documentation? I didn't come up with version 2 by myself, i took it from you guys.

a select looks like this right:


<select ...>
<option value='thisIsTheKeyOrIndexValue'>This is just a label and NOT a value/key/index</option>
</select>

now in your select, go to the example page This should have an implementation equivalent, or at least MUST be possible to create an implementation equivalent of this:


<select ...>
<option value='DE'>German</option>
<option value='US'>United States</option>
</select>

select germany will get you the value: DE, selecting Unites States will select you the value "US"

this is how selects work, they have a value (DE) and a label (Germany). What you have is only a label that acts as value at the same time.

So if i have a select and I want to use your plugin, I cannot even use it. If i miss something feel free to point it out please

garnold commented 8 years ago

@Jossnaz Take a look at the example in the README, specifically the data-val attribute.

franckevva commented 8 years ago

Thanks, @Jossnaz , I will fix our documentation about defer. As @garnold write, select has data-val attribute and it shows in the example. I don't see any other point in your issue.

torian257x commented 8 years ago

oh there was another example... i was looking at the docs here http://creativeit.github.io/getmdl-select/

you styled it all like the MDL page, so i thought that page is supposed, like the MDL page, to give me all information