Comments (11)
Aurelia treats native select in a special way, unlike non-native MDC widget. I'll see if I can do anything about it
from aurelia-mdc-web.
Version 1.1.6 does not need explicit mdc-list element. Please remove that or upgrade to v2 of the bridge.
from aurelia-mdc-web.
I cannot reproduce the issue in the gist
https://gist.dumber.app/?gist=4fb62077f5564275f96253b8e708314a
from aurelia-mdc-web.
It works when _availableStatuses
is already initialized. But not when its lazy loaded like...
const loadAsync = new Promise((resolve, reject) => {
window.setTimeout(() => {
resolve( ["Katze", "passed", "Maus"]);
}, 2000)
});
loadAsync.then((value:string[]) => {
this._availableStatuses = value;
});
Unfortunately, I cannot edit your Gist because of rate limit hit.
from aurelia-mdc-web.
You can only set the value after the select is populated with options, otherwise it cannot find the corresponding list item.
from aurelia-mdc-web.
I've updated the gist for async load, no issue
from aurelia-mdc-web.
But shouldn't it work like that? https://gist.dumber.app/?gist=8204b93b878e0f8ad4f027ace68d06d9
from aurelia-mdc-web.
This cannot work. After activate the widget's value is set but there are no items to match that value with.
from aurelia-mdc-web.
But this is the way I used to implement that the Aurelia way using regular select
elements.
I've updated https://gist.dumber.app/?gist=8204b93b878e0f8ad4f027ace68d06d9 by
<select value.bind="_selectedStatus">
<option repeat.for="status of _availableStatuses" value.bind="status">${status}</option>
</select>
from aurelia-mdc-web.
Hopefully this will be sufficient. I've modified the binding observer to monitor mdc-list-item
mutations.
It will wait for options before trying to pass the current value to the element.
But once options has been set at least once any subsequent options changes will pull the value from the element, possibly overwriting the current value if it is not present in the current list.
from aurelia-mdc-web.
But once options has been set at least once any subsequent options changes will pull the value from the element, possibly overwriting the current value if it is not present in the current list.
Doesn't sound wrong to me.
Thanks. I really apprecriate your passion.
from aurelia-mdc-web.
Related Issues (20)
- Lookup resets value when hidden/shown with 'if.bind'
- Error in MDCDataTable in @aurelia-mdc-web/[email protected] HOT 7
- Deprecation Warning (Non-Urgent)
- [question] How to use Snackbars? HOT 3
- A question on theme support HOT 4
- Font size of list items of drawer not correct HOT 1
- mdc-switch style missing HOT 2
- mdc-switch: Label not clickable anymore
- [bug] - list item trailing links are not clickable HOT 2
- Development guide HOT 4
- Data table navigation and sorting issues HOT 1
- Slider crashes when max and min are changing
- [Bug v2] Expandable styling incorrect HOT 1
- How to listen for mdc-switch "change" event? HOT 2
- List item checkboxes not checkable HOT 1
- mdc-segmented-button single doesn't work on Apple browsers HOT 2
- mdc-list-item non-interactive doesn't seem to work HOT 1
- hosting for au2 docs is dead HOT 2
- documentation down HOT 3
- Error: Cannot read properties of null (reading '$au') -> in dialog via service... v2 branch HOT 4
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 aurelia-mdc-web.