You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a problem with font-picker-react or just my implementation of it. My app has two font pickers and the user can pick a font and save their selection without any issues. The problem is with trying to load the user's chosen font into FontPicker after they've navigated elsewhere on the app and returned to where the FontPicker is.
The error message that says Uncaught Error: Cannot update active font: "XXXXXXXXX" is not in the font list. This happens about 9 times out of 10 no matter which font is selected.
In my functional react component I'm checking for the activeHeaderFontFamily prop (a string) then setting it into state.
constMyComponent=props=>{const[activeHeaderFontFamily,setActiveHeaderFontFamily]=useState("");useEffect(()=>{if(props.activeHeaderFontFamily){setActiveHeaderFontFamily(props.activeHeaderFontFamily);}},[props]);// more code...
And here's how I'm using FontPicker. I pass in the activeFontFamily value directly from state with a fallback to Open Sans.
I'm not sure if this is a problem with font-picker-react or just my implementation of it. My app has two font pickers and the user can pick a font and save their selection without any issues. The problem is with trying to load the user's chosen font into FontPicker after they've navigated elsewhere on the app and returned to where the FontPicker is.
The error message that says Uncaught Error: Cannot update active font: "XXXXXXXXX" is not in the font list. This happens about 9 times out of 10 no matter which font is selected.
In my functional react component I'm checking for the activeHeaderFontFamily prop (a string) then setting it into state.
And here's how I'm using FontPicker. I pass in the activeFontFamily value directly from state with a fallback to Open Sans.
The text was updated successfully, but these errors were encountered: