Skip to content

Commit

Permalink
chore: fix build with TrustedHTML inccorect type
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Nov 13, 2024
1 parent a370551 commit aefbc3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/examples/slickgrid/Example2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ export default class Example2 extends React.Component<Props, State> {
hideTotalItemCount: true,
hideLastUpdateTimestamp: true
},
sanitizer: (dirtyHtml) => DOMPurify.sanitize(dirtyHtml, { ADD_ATTR: ['level'], RETURN_TRUSTED_TYPE: true }),
// sanitize is returning a different TrustedHTML type, not sure why but we can cast as string to avoid build issue, the result will still be TrustedHTML
sanitizer: (dirtyHtml) => DOMPurify.sanitize(dirtyHtml, { ADD_ATTR: ['level'], RETURN_TRUSTED_TYPE: true }) as string,

// you customize all formatter at once certain options through "formatterOptions" in the Grid Options
// or independently through the column definition "params", the option names are the same
Expand Down

0 comments on commit aefbc3f

Please sign in to comment.