Hi,
I’ve noticed an issue that occurs only up to version 9.2.52, where expandAll causes incorrect records to appear (these records do not appear if the nodes are expanded manually). I also noticed that the issue only occurs when using hierarchical fields ('Bucket' in the example) with at least three levels.
Here’s a JSFiddle with the configuration that reproduces the issue. Obviously, the JSFiddle points to the latest version, so the problem doesn’t occur there.
Unfortunately, we have some constraints that prevent us from updating Flexmonster for certain clients, and I understand that it wouldn’t be possible for you to fix the issue in version 9.2.52. However, could you at least tell us what the cause of the problem is, and whether there are any workarounds or configuration options we could use to prevent it from happening?
Attached are Screenshot1, taken with version 2.9.52, where the incorrect record appears, and Screenshot2, which shows how it should look instead.
Thank you very much for your time and help.
Kind regards,
Ilaria
Hello Ilaria,
Thank you for reaching out to us.
As a workaround, we recommend replacing hierarchy with folders. The folder property of the Mapping object allows you to group multiple fields into one folder, like multilevel hierarchies. The described issue will not occur, since it is connected with hierarchies. Please find more details in our documentation: https://www.flexmonster.com/api/field-mapping-object/#folder.
You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/kmfugno9/.
Please let us know if other questions arise.
Kind regards,
Nadia 
Hi Nadia,
Thank you for your reply.
We tried the suggested approach of removing hierarchical fields and using the folder functionality instead (grouping date fields under a folder rather than using a hierarchy).
However, this solution is unfortunately not feasible for us, as the two features are not equivalent.
With hierarchical fields, users can interact with filters through the hierarchy itself — which is exactly why we implemented it this way.
Using folders instead would not provide the same behavior or user experience.
Is there any alternative workaround that would allow us to keep the hierarchical fields and still avoid the issue with expandAll?
Thank you again for your time and support.
Kind regards,
Ilaria
Hello Ilaria,
Thank you for the response!
We agree that the folders approach is not equivalent to hierarchical fields. From our investigation, the issue seems to be specific to the expandAll method when used together with the hierarchy that has three or more levels.
With this in mind, the best solution would be to use an updated Flexmonster version that has already fixed this issue. However, since updating Flexmonster is not possible in your case, the available workarounds are expanding fields manually, level by level, instead of calling the expandAll method or replacing the hierarchy with folders.
You are welcome to contact us if further questions arise.
Kind regards,
Nadia