Removed logging.
This commit is contained in:
parent
8bbfe20ec4
commit
4271a7f084
@ -203,8 +203,6 @@ const ObjectTable = forwardRef(
|
|||||||
const loadNextPage = useCallback(() => {
|
const loadNextPage = useCallback(() => {
|
||||||
const highestPage = Math.max(...pages.map((p) => p.pageNum))
|
const highestPage = Math.max(...pages.map((p) => p.pageNum))
|
||||||
const nextPage = highestPage + 1
|
const nextPage = highestPage + 1
|
||||||
logger.debug('Next page', nextPage)
|
|
||||||
|
|
||||||
if (hasMore) {
|
if (hasMore) {
|
||||||
setPages((prev) => {
|
setPages((prev) => {
|
||||||
const filteredPages = prev.map((page) => ({
|
const filteredPages = prev.map((page) => ({
|
||||||
@ -310,7 +308,6 @@ const ObjectTable = forwardRef(
|
|||||||
updateEventHandlerRef.current = updateEventHandler
|
updateEventHandlerRef.current = updateEventHandler
|
||||||
|
|
||||||
const newEventHandler = useCallback(() => {
|
const newEventHandler = useCallback(() => {
|
||||||
console.log('GOT NEW EVENT')
|
|
||||||
reload()
|
reload()
|
||||||
}, [reload])
|
}, [reload])
|
||||||
|
|
||||||
@ -369,12 +366,9 @@ const ObjectTable = forwardRef(
|
|||||||
// Cleanup effect for component unmount
|
// Cleanup effect for component unmount
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
console.log('API: Call unsub', connected)
|
|
||||||
if (connected == true && unsubscribesRef.current) {
|
if (connected == true && unsubscribesRef.current) {
|
||||||
console.log('API: Got object unsub')
|
|
||||||
// Clean up all subscriptions when component unmounts
|
// Clean up all subscriptions when component unmounts
|
||||||
unsubscribesRef.current.forEach((unsubscribe) => {
|
unsubscribesRef.current.forEach((unsubscribe) => {
|
||||||
console.log('CALLING UNSUB on unmount')
|
|
||||||
if (unsubscribe) unsubscribe()
|
if (unsubscribe) unsubscribe()
|
||||||
})
|
})
|
||||||
unsubscribesRef.current = []
|
unsubscribesRef.current = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user