table component search field creates temp condition with subcondition property incorrectly

  • 1
  • Problem
  • Updated 3 years ago
  • Acknowledged
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Pat,

Is the error you are getting "Cannot read property 'length' of null" per chance? Try this:
if (condition.subConditions && condition.subConditions.length...
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
That is the error. Is the condition built correctly in the first place?
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Per our documentation, it should be an Array when defined. Search Conditions are a little different in that we add the programmatically though. I'll look into it some more to see if it's something we should treat as a bug (kind of low level, so we have to be careful when making changes), but in the meantime, does that change get your snippet working?