Each node on my graph has an itemArray with a variable number of items in it (tags), however I only want the first two tags shown with an indicator to show that there are more .
I’m showing a list of all items in a tooltip (this bit is done)
How would I render only the first two items of my array and then optionally show a text label saying “+ x more…” if there are more than two?
Your solution works great in terms of rendering the data exactly how I need it, however I’m getting the following typescript error
No overload matches this call.
The last overload gave the following error.
Argument of type '{ itemTemplateMap: go.Map<unknown, unknown>; }' is not assignable to parameter of type 'string | GraphObject | EnumValue | Binding | AnimationTrigger | RowColumnDefinition | PanelLayout | HTMLDivElement | (Partial<...> & { ...; }) | (string | ... 6 more ... | (Partial<...> & { ...; }))[]'.
Types of property 'itemTemplateMap' are incompatible.
Type 'Map<unknown, unknown>' is not assignable to type 'Map<string, Panel>'.
Type 'unknown' is not assignable to type 'string'.ts(2769)
go.d.ts(15431, 12): The last overload is declared here.