web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / UpdateView not being c...
Power Apps
Unanswered

UpdateView not being called as it should with react

(0) ShareShare
ReportReport
Posted on by

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!

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @DPADPA , 

     

    The updateView is called by the platform if the property changes. 
    You are right about  the need to call notifyOutputChanged(). If you do that, the platform will call the getOutputs() method, where you can provide the new values for your properties. Maybe in your case the value of the property is not a new one, so maybe that's why the platfororm doesn't detect a need to call the updateView.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard