Issue with sorting toggle behavior in Flexmonster filter dialog

Answered
Lucas Cercal asked 6 days ago

Good afternoon,

I'm having an issue with the sorting toggle button in Flexmonster. My data is returned unsorted on page load, but when I click the cog icon to change the sorting, the AZ button is already selected, even though my data is not sorted yet. If I click "OK" to close the dialog and apply the AZ sorting, nothing changes.

To sort by AZ, I need to open the dialog, click to sort by ZA, and then click AZ again to activate the sorting option correctly. This behavior is very strange and is confusing to the users.

This bug occurs in the Flexmonster demo fiddle. Follow these steps to reproduce:

  1. Open the example fiddle: https://jsfiddle.net/flexmonster/rkprvhhs/
  2. Click the cog icon in the "Country" cell configuration.
  3. After the dialog opens, note that the AZ sorting option is already checked.
  4. Click "OK" to apply the sorting.
  5. The sorting order will not change.

Expected behavior: After closing the dialog, the data should be sorted as selected.

2 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 5 days ago

Hello, Lucas!

Thank you for reaching out to us.

Kindly note that in the provided example, there is an explicitly set value filter applied to the Price measure, which has higher priority than the inexplicitly set our default members sorting:

sorting: {
column: {
type: "desc",
tuple: [],
measure: {
uniqueName: "Price",
aggregation: "sum",
},
},
},

If we remove the value sorting, the members are sorted AZ by default: https://jsfiddle.net/flexmonster/Ltx7v91g/.

We recommend explicitly setting the default sorting for members where necessary to avoid any confusion: https://www.flexmonster.com/doc/sorting/#set-order.

Hope you will find our answer helpful.

Kind regards,
Solomiia

 

Public
Lucas Cercal 2 days ago

Hello Solomiia!

I understand what you mean. However, I still need the component to continue displaying the initial sorting in a different way. What isn’t clear is that when the filter popup is opened, the data is displayed in the correct "AZ" order, but if I click OK, the data isn’t filtered, which causes confusion for the users.

fiddle: https://jsfiddle.net/sxje150n/6/

Here are some images explaining the issue:

1 - Initial state after page load

2 - I clicked the settings icon next to the "country" category, and the popup opened. Notice that the data displayed in the popup is already filtered as "AZ," and the "AZ" toggle is checked.

3 - After clicking "apply," the data remains as it was before. However, the popup indicated that the data would be filtered. This behavior doesn’t seem correct.

So, am I understanding correctly that if there’s already a filter applied in the slice object, then the changes on the screen stop working?

Thank you for the help!

Please login or Register to Submit Answer