浏览代码

[RN] Fix assigning Dialog state

j8
Lyubo Marinov 7 年前
父节点
当前提交
2306e26287
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      react/features/base/dialog/components/Dialog.native.js

+ 4
- 4
react/features/base/dialog/components/Dialog.native.js 查看文件

@@ -67,6 +67,10 @@ type State = {
67 67
  * Implements {@code AbstractDialog} on react-native using {@code Prompt}.
68 68
  */
69 69
 class Dialog extends AbstractDialog<Props, State> {
70
+    state = {
71
+        text: ''
72
+    };
73
+
70 74
     /**
71 75
      * Initailizes a new {@code Dialog} instance.
72 76
      *
@@ -76,10 +80,6 @@ class Dialog extends AbstractDialog<Props, State> {
76 80
     constructor(props: Object) {
77 81
         super(props);
78 82
 
79
-        this.state = {
80
-            text: ''
81
-        };
82
-
83 83
         // Bind event handlers so they are only bound once per instance.
84 84
         this._onChangeText = this._onChangeText.bind(this);
85 85
         this._onSubmit = this._onSubmit.bind(this);

正在加载...
取消
保存