瀏覽代碼

[RN] Fix assigning Dialog state

j8
Lyubo Marinov 8 年之前
父節點
當前提交
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
  * Implements {@code AbstractDialog} on react-native using {@code Prompt}.
67
  * Implements {@code AbstractDialog} on react-native using {@code Prompt}.
68
  */
68
  */
69
 class Dialog extends AbstractDialog<Props, State> {
69
 class Dialog extends AbstractDialog<Props, State> {
70
+    state = {
71
+        text: ''
72
+    };
73
+
70
     /**
74
     /**
71
      * Initailizes a new {@code Dialog} instance.
75
      * Initailizes a new {@code Dialog} instance.
72
      *
76
      *
76
     constructor(props: Object) {
80
     constructor(props: Object) {
77
         super(props);
81
         super(props);
78
 
82
 
79
-        this.state = {
80
-            text: ''
81
-        };
82
-
83
         // Bind event handlers so they are only bound once per instance.
83
         // Bind event handlers so they are only bound once per instance.
84
         this._onChangeText = this._onChangeText.bind(this);
84
         this._onChangeText = this._onChangeText.bind(this);
85
         this._onSubmit = this._onSubmit.bind(this);
85
         this._onSubmit = this._onSubmit.bind(this);

Loading…
取消
儲存