-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find function or filter #1102
Comments
What happens if you put this in the PolymerExpressions.prototype.getMin = function(input) {
if (input === 'daily') return 1;
else if (input === 'weekly') return 10;
};
PolymerExpressions.prototype.getMax = function(input) {
if (input === 'daily') return 1000;
else if (input === 'weekly') return 5000;
};
PolymerExpressions.prototype.getStep = function(input) {
if (input === 'daily') return 5;
else if (input === 'weekly') return 50;
}; PS consider making a http://jsbin.com to show case the problem, its easier for amatures like me to answer the question :) |
if I add all those expressions inside ready each error repeats twice on page load. |
I not seeing a problem |
thanks for the jsbin - I did slight modification (used direct components from polymer website instead of ../bower_components) live preview link: http://jsbin.com/nonetirovu If i open the chrome console I see the same errors, do you see in your browser? |
lol it even crashed my browser if I click on weekly |
@robdodson why is this breaking the internet :P <paper-slider min="{{type | getMin}}"
max="{{type | getMax}}"
step="{{type | getStep}}"
pin="true">
</paper-slider> |
Note that without paper-slider it works |
I've realised now that your filters don't return a value when the type is not set or unknown so the filters are being cached as undefined. I think you have two choices here to fix this:
or 2. handle unknown\undefined types
|
Suggesting to build in |
@pflannery - initializing @gertcuykens - I did notice the "freeze" issue. But now if I use I think I'll close the issue. Thanks guys. |
it fails when we use filter in |
Below is a sample my-element which uses use custom filters. The custom filter functionality works but console shows weird errors only on page load.
Till now can't find any faults in the functionality or the GUI behavior,
The text was updated successfully, but these errors were encountered: