I'm building a multi-page app with a page-scoped table component. This table has an editable tag column. I want the tag options list (which is based on my page-scoped transformer, responsible_party_options) to be filtered based on the current table row (currentSourceRow). So I tried to use this dynamic data source for the tag column options list
The options list is not loaded ("This column doesn't have an options list..." warning) after page refresh or when viewing the app outside of editor mode. If I copy and paste my code from the options list data source back into to data source, it loads.
Using the dynamic data source for this column interferes with the options list loading for the other tag column (Category) in my table.
Thanks so much for the detailed post, @sgodoshian! Unfortunately, we don't support references to currentRow or currentSourceRow in tag column option lists yet I've added your +1 internally
I know it's not the same UI, but we usually recommend a select component separate from the table or a select component nested in an expandable row
I am experiencing this as well. It seems strange it isn't supported yet works. Just a quick question, I have seen reference often to expandable rows in tables. I am not seeing any way to expand a row. How is this done?
Here is what it is doing for me. I have a column in the source row that is an array and I use this currentSourceRow.arrayColumn as the options list. I works but not supported is the app is refreshed. very very strange. Can we reference currentRow as a supported mapping to the options list?
Edit:
I mis-spoke. I also am getting the same behavior when using a mapping to an array that exists outside the table. I have also been experiencing my table constantly changing is structure on its own while I am editing. For some reason, suddenly some columns will no longer be in the table or some extra ones that I had delete before come back in. Its getting super annoying. I bring it up because I think the two issue's I am having are related to the issue in this post. When I delete one of the columns that isn't supposed to be there, the mapped options list column will suddenly start resolving. It seems like the table component isn't resolving its references on app first load. This table component I am having issues with is on a modal frame and I think maybe there is something to note there. I have a mapped options list in another table that is not in a modal frame and there are no issues.
Edit again:
Looking closer at it, it seems I am unable to reference anything in the mapping FX box. Everything I put in there gets underlined in yellow like it isn't being seen but it does evaluate. Until I reload the app and then I have to give it a shake again to get it to start evaluating.
Here is a little gif showing what is happing. At first you can see some of the tags are loaded. That is because I reset the tag column during a time when the table only had four items. Then when I load in a different order that has more items, the extra items need to have the tag column reset again.
Thanks for chiming in! No, we don't support referencing currentRow in the data source for the options list, but it should support other dynamic values. The modal frame detail is interesting as well
I am reporting this to our team, but I haven't been able to reproduce it. If you're able to share an export of your app with hardcoded data (you can send as a direct message), that would help in moving closer to a fix
Exports with hardcoded data can be downloaded here:
Thanks. Actually, I am not seeing the static reference acting up anymore. Maybe the table component was acting weird because it didn't like my use of currentSourceRow in another tag column options mapping? The one column where I would really like to use currentSourceRow I changed to reference selectedSourceRow. This is really not at all desirable though because for the items in all the column rows to populate there chosen value, I have to select the "allow custom values" option. Just for some context, The table I am editing is displaying products that are going to be sent to the production floor. Each product usually has multiple revisions and I am storing the available revisions of each item on the item in the table as an array which is populating the tag column option. So from the table one can select a different revision to build.
Sorry, I think there was some confusion here. We do support currentSourceRow in the template string for the data source and if that is not working properly there is a bug. @sgodoshian or @Shawn_Crocker – it would be a great help if you could send over a repro app with hard-coded query results in a DM as Tess suggested. Thanks!
I am experiencing something similar when trying to use a filter in a tag's Option List. The data source for my tag won't work if I use a "filter". Strangely when in edit mode, if I resize the container it will work again. But I need the filter to make editing the value work correctly.
@jacobstern@Tess I have partially succeeded in getting the option list within a tag or avatar column type to populate with differing option specific to currentSourceRow. It does not work well though. What I did was have the options list reference a master array of all possible values that is not part of currentSourceRow but I include a .filter() and filter out the values from the array that are not included in the array that is on currentSourceRow. It sort of works but the values do not show up right away. I have to mouse over the table, sometimes clicking on the table and then clicking somewhere else to get the options list to generate within the table. Before that, the column values act as though there value is not matching anything in the options list, like the list has rendered in as an empty array. See the little .gif. As you see, when the values come is, I have not done anything other than mouse over the table. Before I mouse over the table, I had let the table sit for minutes without touching anything to be sure the issue was not just some sort of lagging loadin or something.
The two columns seen here called catalog and category are also option lists but the are both referencing an array that is outside the scope of currentSourceRow. Because the supplier column is making use of currentSourceRow, these two column are also suffering from this loadin problem. When the suppliers column is not referencing currentSourceRow, both catalog and category columns have no issue rendering quickly.
I know its great when people can supply a json export for trouble shooting but in this case, this issue is completely reproduceable and the steps are rather simple. They are as simple as just assigning an option list within a tag, tags or avatar table column to reference an array that exists on the currentSourceRow. The testing developer will immediately see the options list not responding as expected after refreshing the app page. What the tester will see, is the behavior working as expected before refreshing the app page. Upon initially setting the options list to reference currentSourceRow, everything works fine. Its only after loading in a new instance of the app that things go wonky. Let me know if there is anything else you need from me to pin point this bug other than having me create a completely new app on my time referencing static values. I would be quite willing to examine an app a tester creates and make some adjustments to it to reproduce the bug if needed.
Thanks @Shawn_Crocker! I was able to reproduce the problem based on your description. Sorry for not looking into this further after the previous exchange. Let me take a look and see what we can do here.
In addition, just after writing my last post, I versioned the app but the intermittent functioning is not present when using an app release. The value never load in at all.