Issue #2421Opened November 20, 2019by brentonkelly19821 reactions

[BUG] Number Trait Type Adds Attributes to Element

Question

Working Example: https://codepen.io/brenton-kelly/pen/wvvOgLN

On the latest versions: https://unpkg.com/grapesjs https://unpkg.com/grapesjs/dist/css/grapes.min.css

I created a grid component where the user will set the number of columns and the gutter via trait manager. When I use the "number" type for the traits, my "updateModel" method is never fired from my listener and instead, the traits are added to the csGrid element in the canvas DOM as attributes. When I change the trait type to "text", only my method is called as expected.

Answers (2)

artfNovember 27, 20191 reactions

You forgot changeProp: 1 in your traits

brentonkelly1982December 2, 20190 reactions

Thank you!

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.