Ticket #316 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

selection-control: null-text not null

Reported by: gdb Owned by: mpo
Priority: major Milestone: 0.4
Component: modules/kauri-forms Version: trunk
Keywords: selection-control null-text Cc: kauri-discuss@…

Description

On the selection control I've noticed a problem on the null-text option.

When no "valueTemplate" or "labelTemplate" is defined the option with the null-text has also the value of the given null text.

I've tested it on the samples on trunk in the file selection-control.html.xml. When you put on the first member "cake" the options:

"nullable": true,
"null-text": "--- please select ---"

and remove on the initial option: (this is not necessary to reproduce the problem)

"value": "maybe",

You will get something like this:

"cake": {
	  "base": "string",
	  "label": "Would you like cake?",
	  "control": {
		  "base": "selection-control",
		  "options": {
			  "data": ["yes", "no", "maybe"],
			  "nullable": true,
			  "null-text": "--- please select ---"
		  },
		  "initial": {
			  "show": true,
			  "enable": true
		  }
	  }
  }

When you look on the value of the first option you will see the value equals to "--- please select ---", but it should be "" (or null?)

Change History

comment:1 Changed 3 years ago by freya

  • Status changed from new to closed
  • Resolution set to fixed

(In [1530]) fixes #316 : selection-control: null-text not null. if no labels defined: use a copy of option values, not a reference.

Note: See TracTickets for help on using tickets.