angularng2-smart-table

Ng2-smart-table : Use drop-downs or date pickers in inline editing


I was searching for a better table representation for Angular2 and found ng2-smart-table is good to use. But the problem is it doesn't seems to provide a direct way to use drop downs or date pickers in in-line editing.

Is there any way to make it possible or what alternative components I can have to represent a table view in my Angular2 app.


Solution

  • I found something like this for drop-downs:

    private settings = {
      columns: {
        name: {
          title: 'Name'
        },
        valid: {
          title: 'Valid',
          type: 'html',
          editor: {
            type: 'list',
            config: {
              list: [
                {value: true, title: 'Valid'},
                {value: false, title: 'Not valid'}
              ],
            },
          }
        }, //... more columns
      }
    }