LearnNewsExamplesServices
Frontmatter
titleNeo Override update
authorDinkh
stateMerged
createdAtJan 31, 2023, 2:27 PM
updatedAtFeb 2, 2023, 11:33 AM
closedAtFeb 1, 2023, 11:36 AM
mergedAtFeb 1, 2023, 11:36 AM
branchesdevNeo-override-update
urlhttps://github.com/neomjs/neo/pull/3963
Merged
Dinkh
Dinkh commented on Jan 31, 2023, 2:27 PM

@featureRequest: fix #3964 Allows now underscore items, which add support for afterSet and beforeSet.

@example

Neo.overrides = {
    Neo: {
        component: {
            Base: {
                foo_: 1,

                afterSetFoo: function(newValue, oldValue) {
                    let style = this.style;
                    style.color = 'green';
                    this.style = style;
                }
            }
        }
    }
};

export default Neo.overrides;

Please make sure to read the Contributing Guidelines:

https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch, not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information: