From cea7ef2f8a6b608f31d9ebffdda07c2a336db9c3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 七月 2023 09:24:00 +0800
Subject: [PATCH] 2023-07-07

---
 src/components/normalform/modalform/mkSelect/index.jsx |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/components/normalform/modalform/mkSelect/index.jsx b/src/components/normalform/modalform/mkSelect/index.jsx
index 660fea9..840dd4a 100644
--- a/src/components/normalform/modalform/mkSelect/index.jsx
+++ b/src/components/normalform/modalform/mkSelect/index.jsx
@@ -31,6 +31,17 @@
     MKEmitter.addListener('mkFC', this.mkFormControl)
   }
 
+  UNSAFE_componentWillReceiveProps (nextProps) {
+    const { config } = this.state
+
+    if (!is(fromJS(config.oriOptions), fromJS(nextProps.config.oriOptions))) {
+      this.setState({
+        config: fromJS(nextProps.config).toJS(),
+        options: fromJS(nextProps.config.options).toJS()
+      })
+    }
+  }
+
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.state), fromJS(nextState))
   }
@@ -119,7 +130,7 @@
             onChange={(val) => val === undefined && this.selectChange('')}
           >
             {options.map((option, i) =>
-              <Select.Option key={i} disabled={option.disabled} extend={option[config.extendName] || ''} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option>
+              <Select.Option key={i} disabled={option.disabled} title={option.label || option.text} extend={option[config.extendName] || ''} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option>
             )}
           </Select>
         )

--
Gitblit v1.8.0