Hey all,
I'm having problems for a week now, and I hope you guys can help me.
I'm creating a PCF with react that renders a component with one DefaultButton and two Dropdowns from FluentUI. When clicked, the onClick of the DefaultButton calls the context.device.pickFile() method for a user to choose a .xlsx file, and another method is called (readExcel()) to read the file and get the name of the columns as the Dropdown options, updating 2 useStates created to hold the IDropdownOptions. I was expecting that the component and the updateView would re-render, but for some reason, the updateView is not being called, even when i call notifyoutputchanged() as a prop from the readExcel() method.
The component and the control are only updated when I click the DefaultButton again (and don't choose any file, clicking "cancel"), only then the Dropdown options are showed.
I also tried to call the context.factory.requestRender() method to force the updateView to act at the end of the readExcel() method, but not even calling it I was able to make the control update automatically after choosing the excel file, I always have to click the DefaultButton for the options in the Dropdown to appear.
Has anyone already experienced something like that? Does anyone have an Idea about how to solve this problem?
Thank you so much!

Report
All responses (
Answers (