Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

GoJS ItemArray binding with converter does not show textblock value

$
0
0

@uriel wrote:

I am trying to display array inflormatino in a panel.
the code is written in that way

let conditionTextBlock = new go.TextBlock();
let conditionPanel = new Panel(Panel.Vertical);
conditionPanel.add(conditionTextBlock);

I have his code to draw text block in a shape

   let inputsArrayPanel = new go.Panel(go.Panel.Vertical);
   inputsArrayPanel.bind(new go.Binding("itemArray", "", converter))
   let textBlock = new go.TextBlock();
    textBlock.text="SOME_DATA";
   inputsArrayPanel.add(textBlock);

    converter = (data)=> {
        return data.InternalData.**filter**(d=>pridicat);
    };

the converter returns an array.
I have noticed that gojs is calling the converter twice,
in the seocnd time i could see that gojs adds __gohashid

Question what __gohashid is it use for?
Why do I have to use the same array? Can you think of any way I can avoid it?

then I have a problem, when doing this code the layout is drawn
but no items are displayed in the from the array. (I cannot see "SOME_DATA" anywere)

when I drag the shape the binding happens again and now everything is OK.

Due to constraints I'm forced to use a method rather then bind to a given array - I'd like to be bound to a result of a service instead of the persisted array.

Thanks.

Posts: 13

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles