I have a structure like this:
export var CustomDropdown: any[] = [
{
class_name: "fonts-list",
list: false,
...
}
]
After initializing this variable, I create another one:
CustomDropdown.push(
{
class_name: "colors-list",
list: CustomDropdown[0].list,
...
}
)
You see, the second time I instance this structure, I refer list from the first one. That's working fine.
The thing is, I want the list key to always maintain itself updated with the first one (if the first one's list becomes true, the second's one should also).
The thing is, that does not happen, and I believe it's because, when the second element is made, it just reads the list value of the first, but it does not create any connection between them.
So I believe something like a C pointer would fix my problem, or any other strategy that I do no know.
Also, I do not want a function to control this, only if its impossible. Can anyone help me?