Removed more logging.
This commit is contained in:
parent
4271a7f084
commit
e4b766fab1
@ -279,7 +279,6 @@ const ObjectTable = forwardRef(
|
|||||||
|
|
||||||
const reload = useCallback(async () => {
|
const reload = useCallback(async () => {
|
||||||
setLazyLoading(true)
|
setLazyLoading(true)
|
||||||
console.log('Pages during reload', pagesRef.current)
|
|
||||||
for (let i = 0; i < pagesRef.current.length; i++) {
|
for (let i = 0; i < pagesRef.current.length; i++) {
|
||||||
const page = pagesRef.current[i]
|
const page = pagesRef.current[i]
|
||||||
await fetchData(page.pageNum)
|
await fetchData(page.pageNum)
|
||||||
@ -288,7 +287,6 @@ const ObjectTable = forwardRef(
|
|||||||
|
|
||||||
// Update event handler for real-time updates
|
// Update event handler for real-time updates
|
||||||
const updateEventHandler = useCallback((id, updatedData) => {
|
const updateEventHandler = useCallback((id, updatedData) => {
|
||||||
console.log('GOT UPDATE FOR', id)
|
|
||||||
setPages((prevPages) =>
|
setPages((prevPages) =>
|
||||||
prevPages.map((page) => {
|
prevPages.map((page) => {
|
||||||
const updatedItems = unionBy(
|
const updatedItems = unionBy(
|
||||||
@ -328,7 +326,6 @@ const ObjectTable = forwardRef(
|
|||||||
|
|
||||||
// Subscribe to new items only
|
// Subscribe to new items only
|
||||||
newItemIds.forEach((itemId) => {
|
newItemIds.forEach((itemId) => {
|
||||||
console.log('SUB', itemId)
|
|
||||||
const unsubscribe = subscribeToObjectUpdates(
|
const unsubscribe = subscribeToObjectUpdates(
|
||||||
itemId,
|
itemId,
|
||||||
type,
|
type,
|
||||||
@ -354,7 +351,6 @@ const ObjectTable = forwardRef(
|
|||||||
subscribedIdsRef.current.splice(index, 1)
|
subscribedIdsRef.current.splice(index, 1)
|
||||||
const unsubscribe = unsubscribesRef.current[index]
|
const unsubscribe = unsubscribesRef.current[index]
|
||||||
if (unsubscribe) {
|
if (unsubscribe) {
|
||||||
console.log('UNSUB', itemId)
|
|
||||||
unsubscribe()
|
unsubscribe()
|
||||||
}
|
}
|
||||||
unsubscribesRef.current.splice(index, 1)
|
unsubscribesRef.current.splice(index, 1)
|
||||||
@ -377,8 +373,6 @@ const ObjectTable = forwardRef(
|
|||||||
// Clean up type subscription
|
// Clean up type subscription
|
||||||
}
|
}
|
||||||
if (connected == true && subscribeToObjectTypeUpdatesRef.current) {
|
if (connected == true && subscribeToObjectTypeUpdatesRef.current) {
|
||||||
console.log('UNSUBBING type subscription on unmount')
|
|
||||||
console.log('API: Got type unsub')
|
|
||||||
subscribeToObjectTypeUpdatesRef.current()
|
subscribeToObjectTypeUpdatesRef.current()
|
||||||
subscribeToObjectTypeUpdatesRef.current = null
|
subscribeToObjectTypeUpdatesRef.current = null
|
||||||
}
|
}
|
||||||
@ -390,10 +384,6 @@ const ObjectTable = forwardRef(
|
|||||||
connected == true &&
|
connected == true &&
|
||||||
subscribeToObjectTypeUpdatesRef.current == null
|
subscribeToObjectTypeUpdatesRef.current == null
|
||||||
) {
|
) {
|
||||||
console.log(
|
|
||||||
'API: Subbing to updates',
|
|
||||||
subscribeToObjectTypeUpdatesRef.current
|
|
||||||
)
|
|
||||||
subscribeToObjectTypeUpdatesRef.current = subscribeToObjectTypeUpdates(
|
subscribeToObjectTypeUpdatesRef.current = subscribeToObjectTypeUpdates(
|
||||||
type,
|
type,
|
||||||
newEventHandler
|
newEventHandler
|
||||||
@ -515,7 +505,6 @@ const ObjectTable = forwardRef(
|
|||||||
]
|
]
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('Pages', pages)
|
|
||||||
pagesRef.current = pages
|
pagesRef.current = pages
|
||||||
}, [pages])
|
}, [pages])
|
||||||
// Add columns in the order specified by model.columns
|
// Add columns in the order specified by model.columns
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user