Comments (3)
@tomnez thanks for investigating! I think we should definitely update to use value={{value}}
instead of value={{selectedOption}}
(that just seems like a small bug that slipped through). I've tested something like your suggested fix of passing selected
explicitly on the option
element and it seems to solve the problem. I'd say let's roll with that - I'd rather differ slightly from the React code and have the same functionality/lack of bugs, than match their code word-for-word 😉 The only thing I'd suggest would be to pass selected={{eq opt.value value}}
since it seems slightly more prudent to match on the underlying values rather than on labels. I'll let you put a PR up to claim the glory for this one! 💪🔥
from ember-polaris.
@andrewpye I looked into this and can't really see any big difference in implementation other than us using value={{selectedOption}}
instead of value={value}
to set the value
attr of the select
tag. But changing to value={{value}}
doesn't make a difference either.
I tried waiting until selectedOption
was set to render the select field, but that didn't help (thought maybe it could be a weird render issue with setting value after render or something).
The only thing that seemed to work for me was explicitly adding a selected
attr to the option
tags:
but that goes against the React implementation so I'm not sure if we want to do that. Thoughts?
from ember-polaris.
Closed in #245
from ember-polaris.
Related Issues (20)
- Update labelled component to v2.11.0 HOT 1
- Update page component to v2.11.0 HOT 1
- Update radio button component to v2.11.0 HOT 1
- Upgrade drop-zone component to v2.11.0
- Add Sticky component HOT 1
- Add Select component HOT 1
- Upgrade button-group component to v2.11.0
- Upgrade action-list/item component to v2.11.0
- Create new OptionList component HOT 1
- Refactor ActionList and sub components HOT 1
- Breadcrumb onAction handler gets passed click event object HOT 1
- polaris-select selects first option as selected if null value is passed in HOT 7
- [DatePicker] Issues HOT 1
- Callout card illustration is missing alt text HOT 3
- Resource list filter creator does not update filter value selector type
- Dependency Dashboard
- How exactly to install and use? HOT 3
- Action Required: Fix Renovate Configuration
- Failed Install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-polaris.