JackAdams / meteor-editable-text

Drop-in editable text widget for meteor

Home Page:http://editable-text-demo.taonova.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What happened to this.oldValue? (Revisited from #49)

mvanio opened this issue · comments

commented

As #49 : this.oldValue is always undefined regardless of using beforeUpdate or afterUpdate.

EditableText.registerCallbacks({
  beNumeric: function(){
    console.log(this.oldValue);
    console.log(this.newValue);
  }
});

results in:

I20150922-16:53:47.511(1)? undefined
I20150922-16:53:47.511(1)? 12

Here's how I'm triggering the callback:

<td>
  {{> editableText inputStyle="inStyle" beforeUpdate="beNumeric" type="number" collection="funnyfolks" field="jokes.read.aloud.times"}}
</td>

I'm using 0.8.4 and I know you said this was fixed but it seems not to be. Am I missing something?

No, you're absolutely right. It's still not fixed properly. Will release 0.8.5 later today. And if that doesn't fix it, I'll deprecate this package on the grounds of maintainer incompetence! (Not really.)

Thank you for persisting with this.

I'm pretty sure I've got it this time. I did have this.oldValue was working, but only for top level fields. Now it's working for nested fields, which I notice is what you have there. 0.8.5 is tested and working for nested fields.

commented

Thank you kindly. I didn't think to mention it was a nested field, sorry
about that.
I'll try 0.8.5 this evening.

No. That's all right. It was a genuine bug and I'm glad you persisted with it. I'm grateful.

Sent from my iPhone

On Sep 23, 2015, at 6:51 PM, markv notifications@github.com wrote:

Thank you kindly. I didn't think to mention it was a nested field, sorry
about that.
I'll try 0.8.5 this evening.

On 23 September 2015 at 11:40, Brent Abrahams notifications@github.com
wrote:

I'm pretty sure I've got it this time. I did have this.oldValue was
working, but only for top level fields. Now it's working for nested fields,
which I notice is what you have there. 0.8.5 is tested and working for
nested fields.


Reply to this email directly or view it on GitHub
#50 (comment)
.

Connect with us on Facebook
http://www.facebook.com/pages/SoulPad/7845355665, Twitter
http://twitter.com/#%21/soulpad, Flickr
http://www.flickr.com/photos/soulpad/ and Google+
https://plus.google.com/110426494904760705884

Reply to this email directly or view it on GitHub.

commented

0.8.5 is working fine, thanks for the fix!
However, I now appear to need to use a Meteor 1.2rc due to the error:

Errors while adding packages:
While selecting package versions:
error: unknown package: isobuild:isopack-2
Required by: babrahams:editable-text 0.8.5

(and so far this has not affected any other packages in a serious way).