question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileTypeIcon with font won't work in Field Customizer

See original GitHub issue

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [1.1.2 ]

Expected / Desired Behavior / Question

FileTypeIcon control is displayed correctly when used in Field Customizer.

Observed Behavior

FileTypeIcon is not displayed

Steps to Reproduce

  • create Field Customizer Project with React Framework
  • install and reference @pnp/spfx-controls-react
  • change the customizer markup to be something like
<div className={styles.cell}>
  <FileTypeIcon type={IconType.font} path={'.docx'} />
</div>
  • nothing is rendered

The reason for that is that default office ui fabric classes with font-family definitions are not referenced by the component and it has default inherited font-family

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
estruyfcommented, Jan 16, 2018

Thanks for testing! I’ll release this to version 1.1.3

0reactions
AJIXuMuKcommented, Jan 16, 2018

Hi @estruyf Yup now it works!

Awesome job! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatting syntax reference
If the thumbanil fails to load (or if the file type doesn't support thumbnails), a file type icon is shown instead. JSON
Read more >
@pnp/spfx-controls-react
Be aware that the controls might not work in solutions you're building for ... customizer); FieldPicker (control to pick one or multiple fields...
Read more >
How do you display the doc icon in a formatted view?
I am able to create the json to "format view" a document library but would like to display the doc icon in the...
Read more >
Font Awesome 5, why is CSS content not showing?
First, you only need to include the CSS file of Font Awesome 5 either in ... and then edit the icon, the css...
Read more >
Alternative to 'File Types' manager of Windows
button of the icon field, the FileTypesMan tool stops responding. ... file extensions that FileTypesMan won't load their icons, in order to avoid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found