-
Notifications
You must be signed in to change notification settings - Fork 2
delegate.updateModifier is not a function #32
Comments
The crash happens on this line: I've linked to latest tagged version of the file which happens to be |
Here's my modifier implementation based on the modern import Modifier from 'ember-modifier';
import { action } from '@ember/object';
export default class DidResizeModifier extends Modifier {
detector = null;
constructor(owner, args) {
super(owner,args);
this.detector = owner.lookup('resize-detector:resize-observer');
}
@action
onResize(element) {
const onResize = this.args.positional[0];
if (onResize) {
return onResize(element);
}
}
didInstall() {
this.detector.listenTo(this.element, this.onResize);
}
didReceiveArguments() {
this.onResize(this.element);
}
willRemove() {
this.detector.removeListener(this.element, this.onResize);
}
} It accepts a positional arg, e. g. |
Hey @lolmau, I'll take a look this week. I want to come back and fix a few things in this addon. Also, in the past week it looks like there's another container query solution for ember: https://github.com/ijlee2/ember-container-query. I will still definitely look into fixing this though, thanks again for the report! |
Huh? I wonder if the author was aware of Looks like it relies on ember-did-resize-modifier which relies on element-resize-detector which does not use I wonder if depending on |
CC @ijlee2. |
@chadian @lolmaus Hello! Thanks for including me in this conversation. Yep, I was aware of I used |
Hey @ijlee2, thanks for chiming in! What exactly were the reasons for rewriting? |
Hmm, I'm not sure if this GitHub issue is a good place to share my reasons as they're unrelated to A few months back, my team and I noticed that Percy snapshots would show Initially, I tried reading PS. Chad, if you have concerns or questions, please feel free to reach out to me on Discord (ijlee2). I'd be happy to talk with you! |
Hey @ijlee2! Definitely appreciate the shout out. It's really cool to see the idea continue to gain traction and to see iterations on the idea. I think the concept will make responsive design much easier to work with. I myself borrowed the concept and sampled existing work from @lolmaus and others that I've mentioned in my README. As a side note, I started with It's true my addon has quite a few pieces that were somewhat needed in the early days. My addon took some interesting design changes and evolved pretty quickly along side the prep for my talk (the first implementation used custom Computed Properties and stashed state like All in all, it's really cool to see people putting thoughts into this space. I love your demo app and hope others check out your addon (I'll add a comment to my README so others are aware). I'd definitely be interested in comparing notes, I'll hit you up on discord. |
@chadian Thanks, your words mean a lot to me! |
Hey @chadian!
Seeing this when using the
ember-fill-up
modifier.Is there a reason to use a custom modifier manager?
The text was updated successfully, but these errors were encountered: