LearnNewsExamplesServices
Frontmatter
id8047
title[Container] Add silent parameter to add() method
stateClosed
labels
enhancementgood first issueai
assigneestobiu
createdAtDec 7, 2025, 1:52 PM
updatedAtDec 7, 2025, 1:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/8047
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 7, 2025, 1:54 PM

[Container] Add silent parameter to add() method

Closed v11.17.0 enhancementgood first issueai
tobiu
tobiu commented on Dec 7, 2025, 1:52 PM

The Neo.container.Base.add(item) method currently does not support a silent parameter, unlike insert(index, item, silent) and remove(component, destroy, silent).

This limitation forces a VDOM update cycle every time add() is called, which is inefficient when adding multiple items sequentially or when managing complex state transitions (like in drag-and-drop operations) where we might want to defer the update.

Task: Update Neo.container.Base.prototype.add to accept a silent parameter and pass it through to insert.

    /**
     * Inserts an item or array of items at the last index
     * @param {Object|Array} item
     * @param {Boolean} [silent=false]
     * @returns {Neo.component.Base|Neo.component.Base[]}
     */
    add(item, silent=false) {
        let me = this;
        return me.insert(me.items ? me.items.length : 0, item, silent)
    }
tobiu added the enhancement label on Dec 7, 2025, 1:52 PM
tobiu added the good first issue label on Dec 7, 2025, 1:52 PM
tobiu added the ai label on Dec 7, 2025, 1:52 PM
tobiu assigned to @tobiu on Dec 7, 2025, 1:53 PM
tobiu referenced in commit ea56f18 - "[Container] Add silent parameter to add() method #8047" on Dec 7, 2025, 1:54 PM
tobiu closed this issue on Dec 7, 2025, 1:54 PM