{"action":"created","issue":{"url":"https://api.github.com/repos/Dogfalo/materialize/issues/2631","labels_url":"https://api.github.com/repos/Dogfalo/materialize/issues/2631/labels{/name}","comments_url":"https://api.github.com/repos/Dogfalo/materialize/issues/2631/comments","events_url":"https://api.github.com/repos/Dogfalo/materialize/issues/2631/events","html_url":"https://github.com/Dogfalo/materialize/issues/2631","id":125828459,"number":2631,"title":"Ghost transformation of Select elements into ul li is very messy and causing major problems.","user":{"login":"9Dave9","id":1446462,"avatar_url":"https://avatars.githubusercontent.com/u/1446462?v=3","gravatar_id":"","url":"https://api.github.com/users/9Dave9","html_url":"https://github.com/9Dave9","followers_url":"https://api.github.com/users/9Dave9/followers","following_url":"https://api.github.com/users/9Dave9/following{/other_user}","gists_url":"https://api.github.com/users/9Dave9/gists{/gist_id}","starred_url":"https://api.github.com/users/9Dave9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9Dave9/subscriptions","organizations_url":"https://api.github.com/users/9Dave9/orgs","repos_url":"https://api.github.com/users/9Dave9/repos","events_url":"https://api.github.com/users/9Dave9/events{/privacy}","received_events_url":"https://api.github.com/users/9Dave9/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-10T16:13:10Z","updated_at":"2016-01-10T19:10:40Z","closed_at":null,"body":"Essentially the id's for the `option` elements become useless - as the li elements Materialize creates -  only take in the inner most HTML i.e text for the corresponding element it is trying to clone into an \r\n\r\n`<li><span>innermost text in my option element</span></li>`\r\n\r\nFor for example if my select options contain `<a href=\"some_id\">category</a>`.. the anchor tag is stripped out! How do you make those options actual links without messing around with javascript?!\r\n\r\nAny class and id on my option elements for my select is also stripped out so I have no way of finding out which option was selected in the original in case I want to trigger a link or content stripped out by materialize in my select options. At the very least the id and options should also be copied over to make manipulation with js so much easier.\r\n\r\nExample.\r\n\r\n``` html\r\n   <select   id=\"catgeories_selection\">\r\n     <option id=\"option_id_1\" value=\"1\"><a href='#category1'>category 1</a></option>\r\n     <option id=\"option_id_2\" value=\"2\"><a href='#category1'>category 2</a></option>\r\n    ... etc etc etc\r\n  </select>\r\n\r\nShould be converted by materialize(if you insist on not just styling the actual select) to:\r\n   <ul  id=\"catgeories_selection\">\r\n      <span id=\"option_id_1\"><a href='#category1'>category 1</a></span>\r\n      <span id=\"option_id_2\"><a href='#category1'>category 1</a></span>\r\n     ... etc etc etc\r\n```\r\nand finally you will still need a value for the input element you are using to display the option selected... and using the inner most html text of each option is fine.. But you really shouldn't remove any html or content for that matter from the options when creating your styled `<li>`."},"comment":{"url":"https://api.github.com/repos/Dogfalo/materialize/issues/comments/170382650","html_url":"https://github.com/Dogfalo/materialize/issues/2631#issuecomment-170382650","issue_url":"https://api.github.com/repos/Dogfalo/materialize/issues/2631","id":170382650,"user":{"login":"9Dave9","id":1446462,"avatar_url":"https://avatars.githubusercontent.com/u/1446462?v=3","gravatar_id":"","url":"https://api.github.com/users/9Dave9","html_url":"https://github.com/9Dave9","followers_url":"https://api.github.com/users/9Dave9/followers","following_url":"https://api.github.com/users/9Dave9/following{/other_user}","gists_url":"https://api.github.com/users/9Dave9/gists{/gist_id}","starred_url":"https://api.github.com/users/9Dave9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9Dave9/subscriptions","organizations_url":"https://api.github.com/users/9Dave9/orgs","repos_url":"https://api.github.com/users/9Dave9/repos","events_url":"https://api.github.com/users/9Dave9/events{/privacy}","received_events_url":"https://api.github.com/users/9Dave9/received_events","type":"User","site_admin":false},"created_at":"2016-01-10T19:10:40Z","updated_at":"2016-01-10T19:10:40Z","body":"What I am actually doing is replacing the Materialize tab headings with a select for mobile users. \r\nAnd since the 'value' of each original object is ignored when building the Materialize 'ul'. That information is being lost - so my next attempt at working around this was to add in an anchor tag. BUT  - I see now it's not just anchor tags - Materialize strips out any HTML tags inside the option tags if I am not mistaken.\r\n\r\nAlso I am know using the Materialize js function\r\n'$('ul.tabs').tabs('select_tab', 'tab_id')' - which seems to do that  job. \r\n\r\n `<option>` tags have values for a reason though - usually, standard practice is to add the numeric id of a certain object in the `value` field and the actual human readable `name` of said object in the option field i.e \r\n\r\n'<option value=\"referable_db_id\">Human readable part</option>'\r\nThis is now impossible because the value is stripped - maybe add it to the `<li>` elements materialize creates as an `id`? \r\n\r\nI was trying to add the anchor tags because the 'value' was not being added to the <li>  tags.\r\nAll I really needed was have a `class` or `id` ` to reference so I could hide or display the correct tab.\r\n\r\n\r\nThis is a great lib btw - thanks a bunch(forgot to mention this above.)"}}