This commit is contained in:
Raphaël MANSUY 2025-12-04 19:18:41 +08:00
parent 494135b19b
commit 1331c38fe4
2 changed files with 3 additions and 2 deletions

View file

@ -126,9 +126,10 @@ const EditablePropertyRow = ({
} else {
// Node was updated/renamed normally
try {
const graphValue = name === 'entity_id' ? finalValue : value
await useGraphStore
.getState()
.updateNodeAndSelect(nodeId, entityId, name, finalValue)
.updateNodeAndSelect(nodeId, entityId, name, graphValue)
} catch (error) {
console.error('Error updating node in graph:', error)
throw new Error('Failed to update node in graph')

View file

@ -246,7 +246,7 @@ const useGraphStoreBase = create<GraphState>()((set, get) => ({
console.log('updateNodeAndSelect', nodeId, entityId, propertyName, newValue)
// For entity_id changes (node renaming) with NetworkX graph storage
// For entity_id changes (node renaming) with raw graph storage
if ((nodeId === entityId) && (propertyName === 'entity_id')) {
// Create new node with updated ID but same attributes
sigmaGraph.addNode(newValue, { ...nodeAttributes, label: newValue })