Browse Source

fix: 11111

outaozhen 3 years ago
parent
commit
00d84d8a29
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/pages/Schema/Option/index.tsx

+ 4 - 0
src/pages/Schema/Option/index.tsx

@@ -233,6 +233,10 @@ const Option = () => {
             try {
               if (state.modalType === OptionModalType.ADD) {
                 await tryAddDataSourceItem({ ...values, dataSourceID: state.activeID })
+                setState({
+                  ...state,
+                  menuDataItems: state.menuData.find(i => i.ID === state.activeID)?.items
+                })
               } else {
                 const newItemData = state.menuDataItems.map(item => {
                   if (item.ID === state.current.ID) {