Problem with update view

12 views
Skip to first unread message

Sergey Makridenkov

unread,
Oct 15, 2013, 2:43:23 AM10/15/13
to seren...@googlegroups.com
Hello.

I have code

    @property 'delivery_cost'
      get: -> 
        # # hack
        # setTimeout => 
        #   @delivery_cost_property.trigger()
        #   @delivery_free_property.trigger()
        # , 100

        p 1111

        if @delivery_method == 'mail' && @delivery_free == false
          @cfg_delivery_price
        else
          0

This property depend on products amount.

PROBLEM - When product amount updated then the view with @delivery_cost does not updated!
Hack solve the problem, but put browser to infinitive loop.

Could you help me, please.

Jonas Nicklas

unread,
Oct 15, 2013, 2:53:24 AM10/15/13
to seren...@googlegroups.com
Hi,

you need to specify dependsOn, like so:

@property 'delivery_cost'
      dependsOn: ["delivery_method", "delivery_free", "cfg_delivery_price"]
      get: -> 
        if @delivery_method == 'mail' && @delivery_free == false
          @cfg_delivery_price
        else
          0

/Jonas




--
You received this message because you are subscribed to the Google Groups "Serenade.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serenadejs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages