Hi flexmonster team,In my Next.js 15.2.5 (page router) project, I’m using Flexmonster like this:
<FlexmonsterPivot
ref={flexmonsterRef}
key={cropId}
toolbar={true}
height={600}
report={
cropIdFromSelectView || cropId
? {
dataSource: {
type: "api",
url: "/api/observation/pivot",
index: cropIdFromSelectView
? cropIdFromSelectView
: cropId,
},
}
: {}
}
beforetoolbarcreated={customizeToolbar}
licenseKey={flexmonsterAccess}
/>
I want to do one of these two things:
- Customize the loading box and show my own text to the user,
or
- Read the loading status, so I can display a custom message on the page when it’s loading
Right now, my flexmonsterRef looks like this:flexmonsterRef : {current:{ retry:f() }}
How can I access the loading state or customize the loading box?
Thank you for your support and time!
Hello, Sajjad!
Thank you for reaching out to us.
Kindly note that we provide the built-in loader pop-up for Flexmonster component. To set a custom message for the loader, we suggest changing the label via localization as follows:
1) Check our default localization file and find the labels you want to customize: github.com/flexmonster/pivot-localizations/blob/master/en.json.
2) Set localization labels in Flexmonster as described in the following guide: https://www.flexmonster.com/doc/localizing-component/#set-a-localization.
We have prepared a JSFiddle to illustrate the idea: https://jsfiddle.net/flexmonster/wkszthd1/.
You can also set the localization globally for all reports: https://jsfiddle.net/flexmonster/27gudkw0/.
Please let us know if the suggested approach works well for you.
Kind regards,
Solomiia
Hello flexmonster team
Thank you so much! That really helped me.
Hello, Sajjad!
Thank you for your quick response.
We are happy to hear our suggested approach was helpful.
Feel free to reach out to us if any other questions arise.
Kind regards,
Solomiia