I've been developing a Power Apps component that acts as a "wrapper" or "widget", similar to a dashboard tile. Essentially, it has (in addition to headers, footers, etc.) a center content header that displays a table. So... the table itself exists in the component. However, to make the component reusable in multiple apps, the table content is provided via an input variable (table-type) defined in the component. That works great. Now on to the problem:
Because each app can need different column headers in that table, the column headers are also fed-in via input variables (text-type).
Because each app can need to show/hide individual columns (some apps may need more columns, some less), the "visible" property of each table column is also fed-in via input variables (boolean-type).
So, I have input variables like this:
'ContentTable' <table>
Column1Header <text>
Column1Visible <boolean>
Column2Header <text>
Column2Visible <boolean>
...
All of those input variables are assigned to the appropriate places in the table control in the component. When I create a test app, and add the component, I can define all of those parameters and it works... initially. However, if I switch screens and then come back to this screen, the table data still shows, but SOME columns that should be visible are no longer showing. SOME column headers are showing as the default value, not my defined value. If I check the parameters that define the visibility and headers, they ARE still set to the proper values (even some test text labels prove this)... but the table isn't respecting those values. So... for a column that is supposed to be showing, I check that property's visible property and it's showing as "true", but the column isn't visible. If I change the value to false and then back to true, the column appears. For a header value, I start editing the (correct) value, and as soon as I make a change, the column's heading changes.
The only thing I can think of is that there is a bug in Power Apps where tables in components have some sort of polling or timing issue. Part of the rendering works as it should, but part doesn't. Maybe there are too many input variables and Power Apps just has a hard time polling everything in time before it draws the table. IDK. Any suggestions on how to overcome this?
My backup plan (which I don't really *want* to use, but I will if I have to) is to leave the table completely out of the component, and use output variables from the component to tell the app where (and what size) to add the table from the app side (over the top of the component).