Page 1 of 1

Bug: Stock Item onChangeSelection Selection Mode = 1

Posted: 04 July 2020, 22:50
by RicardoRix
There is a potential bug with the onChangeSelection event that is triggered with Selection Mode = 1 (single item only mode).

If you select an item the event is triggered - no problem.
If then you select a different item, the event is triggered 2 times, firstly the 'item_id' argument is undefined. Presumably this is the previous selected item giving a ghost call. The 2nd call is OK.

If you deselect first, then it's OK.
If you click a single item repeatedly then this behaviour is OK, an argument is always given.

Re: Bug: Stock Item onChangeSelection Selection Mode = 1

Posted: 05 July 2020, 08:35
by Brainchild
I noticed this behaviour and just assumed the callback is informing you the selection has changed from "<item> selected" to "nothing selected". Undefined in this case means nothing is selected.

But if you're saying when deselecting a single item you don't get any callback, that does seem weirdly inconsistent.