Comments (2)
I already faced this deprecation warning and this is how I fix it.
Instead of passing range
and format
props to your nouislider-component
as computed properties, try to pass min, max, from, to
props. Then where you defined your nouislider-component
create range
and format
as setters.
Passing down your properties when you call your component
{{nouislider-component
start=start
connect=true
min=min
max=max
from=from
to=to
}}
Where you defined your nouislider-component.js
range: computed('min', 'max', {
get(key) {
if(this.get(`_${key}`) {
return this.get(`_${key}`);
}
return {
min: this.get('min') || 0,
max: this.get('max') || 100
};
},
set(key, value) {
return this.set(`_${key}`, value);
}
}),
// ... do the same to `format` prop
from ember-cli-nouislider.
Closing this issue, seems to be a wrong implementation on my end. Was doing the following:
<RangeSlider @range={{this.range}}
@start={{this.start}}
@connect={{this.connect}}
@format={{this.sliderFormat}}
/>
Should've done the following:
<RangeSlider @start={{this.start}}
@min={{this.min}}
@max={{this.max}}
@connect={{this.connect}}
@formatTo={{this.sliderFormat.to}}
@formatFrom={{this.sliderFormat.from}}
/>
from ember-cli-nouislider.
Related Issues (20)
- Add docs for changing slider values HOT 1
- noUi-background element nonexistent? HOT 1
- Deprecation warning - Scheduling into the 'sync' run loop queue HOT 5
- setting a computed range causes "Missing 'min' or 'max' in 'range'" HOT 1
- Ember 3.x compatibility? HOT 8
- setValue is triggered during slide-action HOT 7
- Unexpected range values when setting step HOT 2
- [ember-cli-nouislider]: Error: noUiSlider (11.1.0): 'range' is not an object. HOT 1
- Observer is causing performance issues HOT 3
- Property 'padding' is not passed to nouislider HOT 2
- How to set slider value programatically? HOT 1
- Deprecation msg on the use of sendAction thrown in Ember 3.4.x HOT 2
- Error: Cannot read property 'on' of undefined HOT 4
- Overriding Range as described in online docs is deprecated in Ember 3.9+
- Cannot update `max` value after initial render HOT 1
- `slider` is undefined in integration test, leading to failure with "Cannot read property 'on'/'off' of undefined"
- on-start and on-end still use deprecated sendAction method HOT 1
- New Ember Version 3.25 to 3.28 throws error on build of ember-cli-nouislider template
- Ember.Logger deprecation 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-cli-nouislider.