Hello team,
i have a question, in flexmonster exist an expand cell event?
We want to save the structure after the cell is expanded, i know this question is a duplicate of this ticket https://www.flexmonster.com/question/how-to-listen-cell-expand-event/ but our case is different.
thank you
Massimo
Hello, Massimo!
Thank you for reaching out to us.
Kindly note that Flexmonster has a reportchange
event. It can be triggered by a list of API calls/user actions, including expands and collapses of data.
To check if the data was expanded, we suggest the following approach:
1. Store the previous expands using the getReport() API call:
const previousExpands = flexmonster.getReport().slice.expands;
When there is no expanded data, the value will be set to undefined
.
2.Use the callback of reportchange
event to compare the previous expands object with the current one:
flexmonster.on("reportchange", () => {
if( !_.isEqual(previousExpands, currentExpands) ){...}
});
Please note that this approach would notify you about both expands and collapses of data. You're welcome to make further improvements if needed.
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/3of7qm2v/.
Hope it helps. Feel free to ask if any further questions arise.
Regards,
Solomiia
Hello, Massimo!
Hope you are having a great week.
Our team is wondering if you had a chance to try the suggested approach of expands handling. Could you please let us know if our solution helped?
Looking forward to hearing from you.
Regards,
Solomiia.
Hello, Massimo!
Hope you are doing well.
Just checking in to ask if our response helped you with your question about expands handling.
We will be glad to hear your feedback.
Regards,
Solomiia
Hello Solomiia,
unfortunately we haven't had the time yet to validate your suggested approach but we'll keep you informed as soon as we'll be able to check it (I guess in a couple of weeks).
Best regards
Massimo
Hello, Massimo!
Thank you for your response.
Your confirmation is valuable for our team. We will be waiting for the following updates on the case.
You are welcome to ask if any other questions arise.
Best regards,
Solomiia
This question is now closed