Hey when using TanStackTable I have an infinite lo...
# react
h
Hey when using TanStackTable I have an infinite loop when the data array is filtered. So even when I do
Copy code
val tableData = loader.unsafeCast<Array<MyType>>()

TanStackTable {
  data = tableData.filter { true }.toTypedArray()
  ...
}
the tab freezes and I get infinite TanStack refreshes. Edit: I now have done it with a
useMemo
I hope that's correct.
Copy code
val tableData = loader.unsafeCast<Array<MyType>>()
val filtered = useMemo(tabledata) { tableDaata
  ?.filter{ <somePredicate> }
  ?.toTypedArray()
}

TanStackTable {
  data = filtered 
  ...
}
t
Yes, memoization - requirement
💝 1