Hi all,
We had a need to develop a custom search for our users, and used an entity to do it. Basically, users use form fields as search parameters, when they hit our submit button it builds and fetches a FetchXML request. A hidden subgrid (which by default is a list of all records for entity X) is then shown at the same time that we setFilterXml() on it.
We've built a PCF control (virtual, React) which sits on top of a subgrid. Based off
BasicDataGrid in the PCF gallery.
Neither of us have particular experience with react but we're keen.
It works pretty well in general but we've noticed (and made sometimes clunky adjustments to avoid)
If the user resizes their browser, zooms in or out, or clicks to a result and then uses back button*, our filteredXML is thrown away and it defaults to all results showing
*we do save these records so theoretically want to save the filtered grid to display onload if we can think of a way
All of this we've temporarily mitigated by triggering a secret search button when we catch these events but it results in lots of extra fetches etc
What are your strategies to produce a stable PCF control that doesn't reload when the user so much as thinks about zooming in 5% or moving the browser to another window?