Issue #1186Opened June 8, 2018by Chilli-B0 reactions

[Bug] Number trait returns 'undefined'

Question

Hello, it's either a bug or a question, i don't know yet. I defined a new component with - beside others - a number trait, as you can see on the code below. Unfortunately when adjusting the number over the arrows coming along with the trait automatically, it very often switches to 'undefined'.

Code SnippetTEXT
Am I missing something or is this a bug?

	domComps.addType('socialbar', {
		model: dModel.extend({
			defaults: Object.assign({}, dModel.prototype.defaults, {
				showShares: 1,
				size: 32,
				radius: '4',
				droppable: !1,
				traits: [
					{
						label: "Show Shares",
						type: "checkbox",
						name: "showShares",
						changeProp: 1
					},
					{
						type: 'select',
						name: 'size',
						label: 'Icon Size',
						changeProp: 1,
						options: [
							{value: '16', name: '16 Pixels'},
							{value: '32', name: '32 Pixels'},
							{value: '64', name: '64 Pixels'}
						]
					},
					{
						type: 'number',
						name: 'radius',
						label: 'Icon Radius',
						unit: 'px',
						changeProp: 1,
					}
				]
			})
		},
		{
			isComponent: function(el) {
				if (el.getAttribute && "socialbar" == el.getAttribute("data-gjs-type")) {
					return {type: 'socialbar'};
				}
			},
		}),
		view: dView
	});

Answers (2)

artfJune 13, 20180 reactions

For such an issue I'd require a live demo because you might be using an old version. BTW I wasn't able to reproduce it, so it might also be fixed. In case it's not, please open another issue, with a link to a live demo and exact steps on how to reproduce it

lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.