akveo / ng2-smart-table

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

how to insert an nb-icon into a custom cell? #1034

Open EvgenyProkopovich opened 5 years ago

EvgenyProkopovich commented 5 years ago

"dependencies": { "@angular/animations": "^8.0.2", "@angular/cdk": "^8.0.1", "@angular/common": "~8.0.1", "@angular/compiler": "~8.0.1", "@angular/core": "~8.0.1", "@angular/forms": "~8.0.1", "@angular/platform-browser": "~8.0.1", "@angular/platform-browser-dynamic": "~8.0.1", "@angular/router": "~8.0.1", "@nebular/bootstrap": "^4.1.0", "@nebular/eva-icons": "^4.0.0-rc.8", "@nebular/theme": "^4.1.0", "@ng-bootstrap/ng-bootstrap": "^4.2.1", "bootstrap": "^4.3.1", "eva-icons": "^1.1.1", "ng2-completer": "^3.0.2", "ng2-smart-table": "^1.5.0", "normalize.css": "^8.0.1", "pace-js": "^1.0.2", "rxjs": "~6.4.0", "tslib": "^1.9.0", "zone.js": "~0.9.1" }, image image

sancaruso commented 4 years ago

I have the same issue. I recently migrated from Nebular 3 to Nebular 4. With Nebular 3, I used some icons on the action buttons, for example

    edit: {
      editButtonContent: '<i class="nb-edit" title="edit"></i>',
    },

But now I can't use . I tried to use:

    edit: {
      editButtonContent: '<nb-icon icon="edit-outline" title="edit"></nb-icon>',
    },

but I have a warning in js console WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss and the icon doesn't appear.

magnusfernandes commented 4 years ago

I have the same issue, need a fix

temp2010 commented 4 years ago

I have the same issue. I recently migrated from Nebular 3 to Nebular 4. With Nebular 3, I used some icons on the action buttons, for example

    edit: {
      editButtonContent: '<i class="nb-edit" title="edit"></i>',
    },

But now I can't use . I tried to use:

    edit: {
      editButtonContent: '<nb-icon icon="edit-outline" title="edit"></nb-icon>',
    },

but I have a warning in js console WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss and the icon doesn't appear.

they know how to fix: sanitizing HTML stripped some content

fdiogoc commented 4 years ago

Did someone find a solution?

vmarceddu commented 4 years ago

Hi @fdiogoc,

I contacted the support and they told me that fixing this issue isn't a priority for now. They didn't came with any other answer.

Guess we have to use another DataTable component.

lalosh commented 4 years ago

temporarily use the old nebular-icons https://github.com/akveo/nebular-icons/tree/master/src/icons

Ynnck123 commented 2 years ago

I am also facing this issue, has anyone in the meantime find a solution?