mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix(react/collections/board): no columns if dragging column onto itself
This commit is contained in:
		
							parent
							
								
									0dddcbcfa1
								
							
						
					
					
						commit
						7bbb15a535
					
				@ -95,8 +95,11 @@ export default function BoardView({ note: parentNote, noteIds, viewConfig, saveC
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const handleColumnDrop = useCallback((fromIndex: number, toIndex: number) => {
 | 
					    const handleColumnDrop = useCallback((fromIndex: number, toIndex: number) => {
 | 
				
			||||||
        const newColumns = api.reorderColumn(fromIndex, toIndex);
 | 
					        const newColumns = api.reorderColumn(fromIndex, toIndex);
 | 
				
			||||||
        setColumns(newColumns);
 | 
					        if (newColumns) {
 | 
				
			||||||
 | 
					            setColumns(newColumns);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        setDraggedColumn(null);
 | 
					        setDraggedColumn(null);
 | 
				
			||||||
 | 
					        setDraggedCard(null);
 | 
				
			||||||
        setColumnDropPosition(null);
 | 
					        setColumnDropPosition(null);
 | 
				
			||||||
    }, [api]);
 | 
					    }, [api]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user