node-red / node-red.github.io

Node-RED Site
http://nodered.org
Other
99 stars 151 forks source link

docs: clarify editableList resize* callbacks are related to physical size, not item count #355

Open colinl opened 1 month ago

colinl commented 1 month ago

Current Behavior

It appears that the resize() and resizeItem() callbacks on editableList do not get called as they should when an item is added or removed from the list, unless I am misunderstanding the docs. resize() does get called when the node dialog is initially opened, but not thereafter and resizeItem seems never to be called at all. I have not attempted to use them before so don't know whether they have ever worked.

See also forum post https://discourse.nodered.org/t/problem-with-editablelist-resize-callback/88263 where @marcus-j-davies confirms the behaviour (of resize at least).

Expected Behavior

No response

Steps To Reproduce

No response

Example flow

paste your flow here

Environment

GogoVega commented 1 month ago

The documentation is not entirely correct - resize() and resizeItem() are called when:

colinl commented 1 month ago

OK, thanks. Yes, the docs are at least ambiguous.

knolleary commented 1 month ago

Right - these callbacks are related to the physical space of the list, rather than changes to how many items are in the list. I'll transfer this over to the website repo so we remember to update the docs.