this.data.addNew() returns null after pasting values into new row

Posted by: moritz.neugebauer on 23 September 2020, 5:24 am EST

    • Post Options:
    • Link

    Posted 23 September 2020, 5:24 am EST

    Dear Wijmo Team,

    I have a strange behaviour when pasting values into a new row and add another new row. this.data.addNew() returns null in that case.

    Steps I do:

    1. Add new row
    2. Copy some values into new row (don’t leave row e.g. by clicking outside the grid)
    3. Add new row

    Even though itemCreator returns an object, the result of this.data.addNew() returns null.

    To me it seems, that when I do leave the row (into which I copied some values) before I add a new row e.g. by clicking outside the grid, this.data.addNew() returns an object.

    What is happening here?

    Best regards

    Moritz

  • Posted 24 September 2020, 9:08 am EST

    Hi Moritz,

    Sorry, I do not fully understand the steps to replicate the issue. If I add a new row by clicking on it and paste some values on it, then I will have to click outside the new row or press the Enter key. Then only I will be able to add another new row.

    Can you provide me a video replicating the issue? It would be easier for me to understand if I saw the issue. Also, please provide the specific version of Wijmo you are using.

    Regards,

    Ashwin

  • Posted 28 September 2020, 3:33 am EST

    Dear Ashwin,

    thank your for your answer. In the meantime I managed to fix this bug on my side. I had a mix of selectedItem property and an observable of type selectedItem. I’m now using observables everywhere in my code. Maybe it was some sort of race condition.

    I’m using version 5.20202.699.

    Best regards

    Moritz

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels