Issue #3948πŸ’¬ AnsweredOpened Nov 16, 2021by Sudhin350 reactions

My Options ( in traits ) for select component gets resetted every time after each reload of page

Quick answerby artf

Hi @Sudhin35 please follow this API for your custom traits and I'd highly recommend storing your options as a component property instead of using inner components

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link Not there Describe the bug How to reproduce the bug?Install Grapes js and implement the select component codeDrag the select component into the editorClick on the select component and enter the traits Reload the page . What is the expected behavior?Entered options should not be reset in the traits manager for that component Already entered options should be visible in the traits manager for that component What is the current behavior? My Options ( in traits ) for sele...

Answers (2)

artfβ€’ Nov 22, 2021

Hi @Sudhin35 please follow this API for your custom traits and I'd highly recommend storing your options as a component property instead of using inner components

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @Sudhin35. Great question about My Options ( in traits ) for select component gets resetted every time after each reload of page. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific modu...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.