[Ticket cloned from T22252: surveyjs with vite build is not working]
After upgrading with my vite version, seems build working fine.
The event which I mentioned not triggering when I change the theme itself like from Light to Dark from the drop down?
I just want to listen the theme name selection change to save user preferences, so that when they reopen my app, i can set the last selected theme.
Right Now I am doing that in save button click event, but I want to do that in right after user selects the theme.
Hello,
I forwarded the following issue to our developers for further consideration: Creator Theme Settings – Implement the
onThemeSelected
function to handle theme changes in a creator.In the meantime, you may want to use a non-documented
const creator = new SurveyCreator(); creator.getPlugin("designer").themeModel.onThemeSelected.add((sender, options) => { const theme = options.theme; //... });
We'll update you once we have any news to share. Please stay tuned.
Attached the image. Seems there is no method that you mentioned
Property 'themeModel' does not exist on type 'ICreatorPlugin'.
FYI. I am using typescript
Hi Venu,
Please try the following code:
const creator = new SurveyCreator(); const designerPlugin: any = creator.getPlugin("designer"); designerPlugin.themeModel.onThemeSelected.add((sender, options) => { const theme = options.theme; //... });