flutter web:I 我正在尝试将 textformfield 添加到 table 列 header 以在同步融合中搜索 syncfusion_flutter_datagrid

flutter web:I am trying to add textformfield to table column header for searching in sync fusion syncfusion_flutter_datagrid

flutter web:I 我正在尝试将 textformfield 添加到 table 列 header 以在 syncfusion_flutter_datagrid 中按列搜索数据,这在旧版本的 flutter 中是可行的,但是当我升级到 flutter 2.0.2 textformfield 不接受输入。

屏幕截图table screenshot

图书馆参考 https://pub.dev/packages/syncfusion_flutter_datagrid

代码片段

 SfDataGrid(
        columnWidthMode: ColumnWidthMode.fill,
        source: _listDataGridSource,
        headerRowHeight: 100,
        headerCellBuilder: (BuildContext context, GridColumn column) {

            return Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Text(
                  column.headerText,
                  style: TextStyle(fontWeight: FontWeight.normal),
                ),
                SizedBox(height: 10,),
                Container(
                  height: 40,
                  child:TextFormField(
                    key: Key('test'+column.mappingName),
                      onFieldSubmitted: (value){
                      print("Submitted");
                      },
                    
                      autofocus: true,
                      textInputAction: TextInputAction.none,
                      keyboardType:TextInputType.number ,
                      decoration: InputDecoration(
                        hintText: "Search here for"+column.headerText,
                        focusedBorder: OutlineInputBorder(
                          borderSide:
                          BorderSide(color: Colors.grey, width: 1.0),
                        ),
                        enabledBorder: OutlineInputBorder(
                          borderSide:
                          BorderSide(color: Colors.grey, width: 1.0),
                        ),
                      ),
                      onChanged: (value) {
                      setState(() {
                        print('testing');
                        print(value);
                      });

                      }

                  ),


                )
              ],
            );

        },

来自 Syncfusion 的问候。

我们已经分析了您报告的问题。这个问题是由于Flutter 2.0中TextFormField的焦点问题引起的。我们已将此问题报告给框架。更详细的可以参考以下link,

https://github.com/flutter/flutter/issues/78413

一旦我们从他们那里得到详细信息,我们会尽快回复您。