0

I have an array of object which looks like

@observable setting = [
    {
      collapseHeader: SettingsSectionDisplayName.Settings,
      section: SettingsSection.Settings,
      isSelected: isLogged() ? true :  false, ==> This does not work.
    }
    
  ]

So,Here I have a function which is

isLogged = () => {
 
return //boolean on some condition
  
}

Now, Here How can I set the value of a key isSelected on the basis of function returned result ?

It throws an error

TypeError: Object(...) is not a function

Can any one help me with this ?

AbsoluteBeginner
  • 2,160
  • 3
  • 11
  • 21
ganesh kaspate
  • 1
  • 9
  • 41
  • 88

0 Answers0