When I have some measure on line instead of in the measure square the apply button should not be available. This button just shoud be available when all the measures are in wright position.
If just one measure isn't in the wright position the apply button is available and when clicked an error happens in the next page.
Hello, Jose!
Thank you for your question.
We recommend the following approach to disable the Apply button in the Field List if the measure is set to the wrong box:
1. Add the mouseup
event listener to the Flexmonster component container, e.g.:
document.querySelector('#pivot-container').addEventListener("mouseup", (e) =>{});
2. Inside the event handler, query all measures from the Field List pop-up and all the contents of the boxes.
3. Check for any measure in the Rows/Columns/ReportFilters box. If so, toggle the fm-disabled
class on the Apply button.
We have prepared a JSFiddle example to illustrate the approach: https://jsfiddle.net/flexmonster/n7qg2rdu/.
Hope you will find our answer helpful.
Kind regards,
Solomiia
Hello, Jose!
Hope you are doing well.
Our team is wondering if you had some time to check out the provided example with disabling the Apply button on the field List while measures are in the wrong boxes. Could you please let us know if it was helpful?
Looking forward to hearing your feedback.
Kind regards,
Solomiia
Hello, Jose!
Hope you are having a great week.
Just checking in to ask if the example of disabling the Apply button on the field List while measures are in the wrong boxes was useful.
Looking forward to hearing from you.
Best regards,
Solomiia
Hi Solomiia,
yes it works fine and was very useful.
Thank you so much!
Hello, Jose!
Thank you for your feedback.
We are glad to hear our example was useful.
Feel free to contact us in case any other questions arise.
Best regards,
Solomiia