question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get selected option from material_select

See original GitHub issue

Not a bug, but a question: materialize creates a ul from simple select-element, how can you get the currently selected option?

<select id="myselect">
    <option value="1">A</option>
    <option value="2">B</option>
    <option value="3">C</option>
    <option value="4">D</option>
    <option value="5">E</option>
</select>

Thanks for this awesome framework!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:9
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

15reactions
Thanoodcommented, Apr 20, 2016

Try just .val() without any parameters.

11reactions
Dogfalocommented, Mar 4, 2016

val() on the original select On Mar 4, 2016 11:43 AM, “Ben S.” notifications@github.com wrote:

Not a bug, but a question: materialize creates a ul from simple select-element, how can you get the currently selected option?

<select id="myselect"> <option value="1">A</option> <option value="2">B</option> <option value="3">C</option> <option value="4">D</option> <option value="5">E</option> </select>

Thanks for this awesome framework!

— Reply to this email directly or view it on GitHub https://github.com/Dogfalo/materialize/issues/2877.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get Id of selected value in Mat-Select Option in Angular 5
4 Answers 4 ; <mat-select placeholder="Client*" #clientValue (selectionChange)="changeClient($event.value)"> ; <mat-option *ngFor="let client of ...
Read more >
Angular Material Select : Getting and Setting value
To add elements to Select option, we need to use <mat-option> element and to bind value with <mat-option> , use value property of...
Read more >
Select | Angular Material
To add options to the select, add <mat-option> elements to the <mat-select> . Each <mat-option> has a value property that can be used...
Read more >
Material select retrieve option value
Hi,I'm trying to retrieve the value of the options that I have specified for a material select input field. After a lot of...
Read more >
Angular Basics: How To Get Value of Selected Dropdown Item
Angular Basics: How To Get the Value of a Selected Dropdown Menu Item ; You select your team {{ selectedTeam }} using viewChild...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found