Page 1 of 1

Stock.onItemCreate - card_id or div_id?

Posted: 27 December 2020, 06:13
by BitBlitz
The documentation for Stock.onItemCreate shows the 3rd parameters as "card_id", but it seems to be the div id, not the card_id.

In other words, it's exactly the same of card_div.id

Is this intentional, or am I doing something wrong?

Is it true that the card_div.id will ALWAYS end with an underscore and card_id? Can I just parse it off the end of the id reliably?

Re: Stock.onItemCreate - card_id or div_id?

Posted: 27 December 2020, 23:37
by Victoria_La
Div id is always <stock_id>_item_<card_id>

if its not card_id its probably a bug in implementation div id is not really needed here as div node passed already as first parameter

Re: Stock.onItemCreate - card_id or div_id?

Posted: 01 January 2021, 21:17
by BitBlitz
@Victoria_La: Thanks