MCPcopy Create free account
hub / github.com/ModelEngine-Group/app-platform / onInputBlur

Function onInputBlur

agent-flow/src/components/Header.jsx:40–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 });
39
40 const onInputBlur = () => {
41 if (inputRef.current.input.value === '') {
42 return;
43 }
44 if (shape.page.sm.getShapes(s => s.id !== shape.id).some(s => s.text === inputRef.current.input.value)) {
45 message.error(t('nodeTextDuplicate'));
46 return;
47 }
48 shape.text = inputRef.current.input.value;
49 shape.page.triggerEvent({
50 type: EVENT_NAME.NODE_NAME_CHANGED,
51 value: {
52 id: shape.id,
53 name: shape.text,
54 },
55 });
56 setEdit(false);
57 };
58
59 /**
60 * menu点击事件.

Callers 1

getTitleFunction · 0.70

Calls 2

getShapesMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected