LearnNewsExamplesServices
Frontmatter
id7127
titleForm Field afterSetValue Sequencing
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 30, 2025, 11:53 AM
updatedAtJul 30, 2025, 11:57 AM
githubUrlhttps://github.com/neomjs/neo/issues/7127
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 30, 2025, 11:57 AM

Form Field afterSetValue Sequencing

Closed v10.2.0 enhancement
tobiu
tobiu commented on Jul 30, 2025, 11:53 AM

Description

This ticket documents the implementation of a sequence for the afterSetValue method in Neo.form.field.Base. The goal was to ensure that the change event consistently fires after the entire afterSetValue inheritance chain has completed.

Changes

  1. src/form/field/Base.mjs:

    • A construct() method was added.
    • Util.Function.createSequence() is now used within construct() to sequence fireChangeEvent to run after the afterSetValue method.
    • The direct call to fireChangeEvent was removed from afterSetValue.
  2. test/siesta/tests/form/field/AfterSetValueSequence.mjs:

    • A new test file was created to verify the correct sequencing.
    • It includes tests for both Neo.form.field.Text and Neo.form.field.ComboBox.
    • The tests confirm that the change event fires after afterSetValue is complete.

Open Discussion Point

During testing, it was discovered that afterSetValue is called twice for both TextField and ComboBox due to a recursive loop between their value and inputValue configs.

While the primary goal of ensuring the change event fires only once and at the correct time has been achieved, the redundant afterSetValue call remains.

tobiu assigned to @tobiu on Jul 30, 2025, 11:53 AM
tobiu added the enhancement label on Jul 30, 2025, 11:53 AM
tobiu referenced in commit cbfef2c - "Form Field afterSetValue Sequencing #7127" on Jul 30, 2025, 11:55 AM
tobiu closed this issue on Jul 30, 2025, 11:57 AM