I have a table customerTable where Table Data = {{Data.GetCompanyList.data}}.
I have a Input widget named companySearchByName that has no event triggers.
I have a Button widget named findButton that has onClick = {{Data.GetCompanyList()}}.
In Data.js, I have:
export default {
GetCompanyList: async () => {
const v = await ApiQuery.run({
entityName: DataApi.GetCompanyQueryEntity(),
filters: DataApi.GetCompanyFilters(),
}).then(DataApi.GetCompanyQueryMapped);
console.log(v);
return v;
},
}
Note that DataApi.GetCompanyFilters() uses companySearchByName.text if there is a value in it, otherwise it returns all rows. Importantly: This works great if I manually Run it. Also, when I click findButton, I see that this runs per console.log() and filters the results exactly as expected when I put data into companySearchByName and click findButton.
So I am able to get both full results and filtered results, but for the filtered results I only see that come through via console.log(). customerTable never updates and instead continues to show full results that loaded on page load.
I’m unsure what I’m doing wrong here…
Shouldn’t customerTable update with the new rows? Instead, it just shows the original rows that loaded when the page loaded (all rows), which is the default return by GetCompanyList().
Should I be using something other than {{Data.GetCompanyList.data}} for the table data for companyTable?