Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular ng2智能表格:如何在编辑模式下使用当前值预选下拉列表_Angular_Ng2 Smart Table - Fatal编程技术网

Angular ng2智能表格:如何在编辑模式下使用当前值预选下拉列表

Angular ng2智能表格:如何在编辑模式下使用当前值预选下拉列表,angular,ng2-smart-table,Angular,Ng2 Smart Table,我有一个列,需要在编辑时作为下拉列表 当我按下编辑键时,我会得到完整的下拉列表,但没有选择的值 这是我的密码: CompanyName: { title: 'CompanyName, type: 'html', valuePrepareFunction: (cell, row) => { return row.CompanyName }, editor

我有一个列,需要在编辑时作为下拉列表

当我按下编辑键时,我会得到完整的下拉列表,但没有选择的值

这是我的密码:

        CompanyName: {
          title: 'CompanyName,
          type: 'html',
          valuePrepareFunction: (cell, row) => {
            return row.CompanyName
          },
          editor: {
            type: 'list',
            config: {
              list: this.companies  // this.companies = [{value: 1, title: "TestCompany"]
            }
          }
        },
你能试试吗-

valuePrepareFunction: (cell, row) => {
            return row.title
          },
参考文献-

如果有不清楚的地方,请询问,我会提供更多信息