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.

Select not working properly

See original GitHub issue

Not quite sure if I’m missing something or if it’s a bug.

Suppose I have a model with an expirationDate property set to “+1 year”, for a php backend. When adding a model a user gets to choose how long the model will be valid, so in my controller I have something like:

availableDates: [{
    id: '+1 year',
    name: "1 year"
  }, {
    id: '+2 year',
    name: "2 years"
  }, {
    id: 'last day of december',
    name: "end of the year"
  }, ],

and my select looks like this:

{{#paper-select placeholder="Some placeholder" model=model.expirationDate}}
    {{#each availableDates as |date|}}
        {{#paper-option value=date.id}}
            {{date.name}}
        {{/paper-option}}
    {{/each}}
{{/paper-select}}

Now in the option menu I have all the date.names but when selecting an option its showing the id. Am I missing something or is this indeed a bug @peec ?

Menu:

select2

When selected

select1

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chanepcommented, Dec 17, 2015

implement a controller callback just to get a label is quite annoying. pager-option value should not become Label after select (or pager-option should have an additional property)

0reactions
DanChadwickcommented, Apr 20, 2016

Yes, a item label callback is required by design. Let’s close this unless there is discussion for a specific API change for paper-select. Please reopen as needed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML selected="selected" not working properly - Stack Overflow
Ctrl-r, selected option tag is not shown as selected but your last gui selection is. Hit return on the page address field in...
Read more >
Solved: Dropdown On Select not working properly
Hello,. I'm trying to do cascading dropdowns on Lookup columns in a Sharepoint list. A teacher selects one of the schools where he...
Read more >
Select not working - options not appearing on click
Hi, I am having trouble with the material select in my application. The element looks as if it is initializing as expected, however...
Read more >
Common problems - The jQuery replacement for select boxes
Common problems. Select2 does not function properly when I use it inside a Bootstrap modal. This issue occurs because Bootstrap modals tend to...
Read more >
select statement not working properly.... - SAP Community
i have the code like this...it is not working properly.. data: begin of i_md occurs 0,. matnr like mara-matnr,. component like stpo-idnrk,.
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