angularng2-smart-table

How to apply input type to ng2-smart-table


I want to apply a type='number' after "add new" button will show a corresponding rows, but have strings only. What to do?

https://stackblitz.com/edit/angular-vxlqbr


Solution

  • There is no way to add type number to the input-editor by default https://github.com/akveo/ng2-smart-table/blob/master/projects/ng2-smart-table/src/lib/components/cell/cell-editors/input-editor.component.ts

    But you can create your custom editor. See the example https://stackblitz.com/edit/angular-d1pt3d

    Also, there is an advanced example in documentation, check it here https://akveo.github.io/ng2-smart-table/#/examples/custom-editors-viewers