Skip to content

Commit

Permalink
feat(filters): filter-element-Container- DOMPurify
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegario committed Dec 14, 2021
1 parent ab46202 commit 3749fc4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions examples/webpack-demo-vanilla-bundle/src/examples/example07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { ExcelExportService } from '@slickgrid-universal/excel-export';
import { Slicker, SlickVanillaGridBundle } from '@slickgrid-universal/vanilla-bundle';
import { TranslateService } from '../translate.service';

import * as DOMPurify from 'dompurify';
import { ExampleGridOptions } from './example-grid-options';

export class Example7 {
Expand Down Expand Up @@ -318,7 +318,7 @@ export class Example7 {

allFilters() {
const grid = this.sgb;
$(`<div id="modal-allFilter" class="modal is-active" >
const modalHtml:string =`<div id="modal-allFilter" class="modal is-active" >
<style type="text/css">
.table {
display: table;
Expand Down Expand Up @@ -354,7 +354,9 @@ export class Example7 {
<button class="button btn-close is-success">Search</button>
</footer>
</div>
</div>`).appendTo('body');
</div>`;

document.body.appendChild(DOMPurify.sanitize(modalHtml,{ RETURN_DOM: true }));

$(".btn-close").on('click',function() {
grid?.filterService.toggleHeaderFilterRow();
Expand All @@ -377,8 +379,9 @@ export class Example7 {
grid?.filterService.drawFilterTemplate(columnFilter,`#${filterElm}`);
}
}

grid?.filterService.toggleHeaderFilterRow();
if (grid?.slickGrid.getOptions().showHeaderRow){
grid?.filterService.toggleHeaderFilterRow();
}

}

Expand Down

0 comments on commit 3749fc4

Please sign in to comment.