2017년 6월 18일 일요일

Spinner bug - Single item lists fail to update Selection or trigger After Select


I believe this is a bug in the Spinner component.

When presented with a list of only one Element, it will allow
you to click on the one item in its Elements list,
but ignore that selection.

A list with only one element in it is still a list,
and should be treated no differently than a list with
more than one element.

I am working around this by adding code to check for
Spinners with single choices, and heading off their misbehavior
by disabling them.

--
I can see the behaviour. The problem seems to be that the spinner believes that the only element is already selected, and that's why it does not trigger the event. I don't know if this is by design, but I'll have a look at the Spinner in the SDK and see what I can find out.
That is the normal behavior.
Recommendation is to have first item something like:
"Make Selection"

--

If the first element is supposed to be the prompt,
what is the function of the Prompt attribute of the Spinner?
(See attached Designer screen shot)

--
If the Spinner is designed around a particular usage,
(expecting a Title element as the first element,
and assuming it is to be ignored), the documentation
for the Spinner should mention that, perhaps in a
Usage section.  It is not at all obvious, and alternative
usages are entirely plausible to the uninitiated.

The easiest fix here would probably be to the documentation and
tool tips.

--
The prompt is what gets displayed as title
--
Thank you for posting about this. I was trying to use the spinner to select items from a list to be deleted and this behavior confused me a lot. 

--

댓글 없음:

댓글 쓰기