文本框未显示在ng2-smart-table中

时间:2019-06-01 13:21:55

标签: angular ng2-smart-table

我正在尝试在ng2-smart-table组件的列中显示一个文本字段。 已参考ng2-smart-table文档,但文本字段仍未显示。您能帮忙解决这个问题吗? enter image description here 在component.ts文件中:

setting = {
    multimode:true,
    hideSubHeader:true,
    actions: false,
    columns: {
        NAME: 
        {
        title: 'Name'
        },

        VALUE: {
            title: 'Value',
            type:'text',
            editor:{
                type:'text'

            }

         }
        },
        attr: 
        {
        class: 'table table-bordered'
        }
    }

在component.html文件中:

 <ng2-smart-table [settings]="setting" [source]="ConfigureSource" ></ng2-smart-table>

在ConfigureSource.ts文件中:

export const ConfigureData: Array<any> = [
        {
                  "Name": "John",
                  "Value": ""

              },
              {
                  "Name": "Sam",
                  "Value": ""
              }

          ];

1 个答案:

答案 0 :(得分:1)

尝试设置操作:

  

操作:{编辑:正确,位置:'正确'}

可编辑为真的列

相关问题