Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifiers Aren't Pulled Into Parent's Modifiers #57

Open
G0ldenSp00n-zz opened this issue Oct 14, 2018 · 0 comments
Open

Modifiers Aren't Pulled Into Parent's Modifiers #57

G0ldenSp00n-zz opened this issue Oct 14, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@G0ldenSp00n-zz
Copy link
Collaborator

G0ldenSp00n-zz commented Oct 14, 2018

Describe the bug
When creating modifiers with Radon, each modifier should be pulled out and placed into a the modifiers object of the parent, in the same structure as the data in the parent object. As the data in the parent should be deconstructed and back as it's primitive form.

To Reproduce
Steps to reproduce the behavior:

  1. Create A ConstructorNode called Root, and Initialize the Modifiers with Functions
  2. Create a variable generatedTree and set it to CombineNodes with the ConstructorNode
  3. View generatedTree.Root.modifiers and notice that it isn't filled with the created modifiers.

Expected behavior
The data returned to the developer should be deconstructed from SiloNodes, meaning that it should have a .val that has to be called, along with the modifier should be pulled out and kept in the ContainerNode, as the developer is expecting to work with a state that mirror's the way they setup the state tree.

Test Snippet

    test('Collections Should Be Given KeySubscribe', () => {
        let rootNode = new ConstructorNode('Root');

        rootNode.initializeState({
            testArr: [1, 2, 3],
            testObj: {key1: 1, key2: 2, key3: 3}
        });

        let generatedTree = combineNodes(rootNode);

        console.warn('Collections Should Be Given KeySubscribe: Removed Due to Bug Bug #57 - https://github.com/radonjs/Radon/issues/57');
        //Removed Due to Bug Bug #57 - https://github.com/radonjs/Radon/issues/57
        // expect(generatedTree.Root.modifiers.testArr.keySubscribe).toBeTruthy();
        // expect(generatedTree.Root.modifiers.testObj.keySubscribe).toBeTruthy();
    });
@G0ldenSp00n-zz G0ldenSp00n-zz added the bug Something isn't working label Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants