Results 1 to 8 of 8

Thread: Multi bind with bindTo not processed correctly

    You found a bug! We've classified it as EXTJS-27577 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default Multi bind with bindTo not processed correctly

    Test case:

    https://fiddle.sencha.com/#view/editor&fiddle/2l16

    Expected result: The second bind should have all values complete with the value 'c d'.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,005

    Default

    Thank you for sharing this issue with us, Evan. I sent it over to the support team and we will get to work on it.

  3. #3
    Sencha Staff
    Join Date
    Sep 2017
    Posts
    126

    Default

    Hi Evan,

    bindTo is used when you have to pass configs with binding like single, deep. In your case bindTo is not needed and simple data bind will work.
    I doubt bindTo works with tpl, Can you please share a fiddle showing bindTo working with tpl, using single bind

    Regards,
    Pavan,
    Sencha Support.

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    bindTo is used when you have to pass configs with binding like single, deep. In your case bindTo is not needed and simple data bind will work.
    I know it's not needed. In fact, in the test case it explicitly says:

    "// The deep isn't relevant here, but say you were binding to a store"

    Because in my real use case I needed to bind to a store.

    I doubt bindTo works with tpl, Can you please share a fiddle showing bindTo working with tpl, using single bind
    Why is this relevant? I'm not talking about template bindings, I'm talking about multi bindings:

    Code:
    vm.bind({
        a: '{foo}',
        b: '{bar}'
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha Staff
    Join Date
    Sep 2017
    Posts
    126

    Default

    Hello Evan,

    You are trying to mix two different binding types, multibind and bind options(for which bindTo is used).


    https://docs.sencha.com/extjs/6.0.2/...a_binding.html


    I doubt this will work the way you are trying to access d variable. Did you check the updated fiddle to see how you will have to access using d object for this to work. I will go ahead and raise a feature request for this and link the reference number here for you to track the issue.

    Regards,
    Pavan,
    Sencha Support.

  6. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    Again, I feel as though you are not understanding what I'm pointing out. Can you explain to me why you think the first one should provide a deep bind to foo, but the second one should not?

    Code:
    vm.bind('{foo}', () => {
    }, null, { deep: true });
    
    vm.bind({
        fooStore: {
             bindTo: '{foo}',
             deep: true 
        }
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Sencha Staff
    Join Date
    Sep 2017
    Posts
    126

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  8. #8
    Sencha Premium User
    Join Date
    Feb 2012
    Posts
    82

    Default

    Evan, I don't suppose you found a workaround?

Similar Threads

  1. Multi bind oldValue always the same as the value
    By evant in forum Ext JS 6.x Bugs
    Replies: 4
    Last Post: 27 Sep 2018, 2:56 PM
  2. How to access multi selection via bind?
    By stephanschuster in forum Ext 5: Q&A
    Replies: 4
    Last Post: 13 Jan 2017, 8:02 AM
  3. multi-bind XTemplate in widgetcolumn
    By clampart in forum Ext JS 6.x Q&A
    Replies: 0
    Last Post: 28 Nov 2016, 9:54 AM
  4. [FIXED] ST 2.1.0 RC - Legend does not bind correctly with name
    By Grolubao in forum Sencha Touch 2.x: Bugs
    Replies: 5
    Last Post: 1 Nov 2012, 8:02 AM
  5. Replies: 1
    Last Post: 24 Nov 2010, 12:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •