akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 880 forks source link

Input Type File in Column #202

Open sanjay1432 opened 7 years ago

sanjay1432 commented 7 years ago

Hi, I am using ng2-smart-table to configure a table with type "FILE". First when i simply add type = file ,it doesn't change the input type of that column. So i made a Fix in Cell.components.js (ng2-smart-table) & its work perfectly.

template: "\n <div ngIf=\"!cell.getRow().isInEditing && cell.getColumn().type !== 'html'\">{{ cell.getValue() }}

\n <div ngIf=\"!cell.getRow().isInEditing && cell.getColumn().type === 'html'\" [innerHTML]=\"cell.getValue()\">
\n <input *ngIf=\"cell.getRow().isInEditing\" \n [ngClass]=\"inputClass\"\n class=\"form-control\"\n [(ngModel)]=\"cell.newValue\"\n [name]=\"cell.getColumn().id\" \n [id]=\"cell.getColumn().id\" \n [type]=\"cell.getColumn().type\" \n [placeholder]=\"cell.getColumn().title\"\n [disabled]=\"!cell.getColumn().isEditable\"\n (click)=\"onClick($event)\"\n (keydown.enter)=\"onEdited($event)\" \n (keydown.esc)=\"onStopEditing()\">\n "

Added type & id .

Is this is the right approach to make file uploader in smart-table Or there is any other method to do it? Should i make pull request?

panchalpratik83 commented 6 years ago

Hello, can you give example with implemention.

thank you in advance.