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

[FIX] pass the original and annotated dataTable to components #97

Merged
merged 3 commits into from
Mar 28, 2022

Conversation

surchs
Copy link
Contributor

@surchs surchs commented Mar 28, 2022

  • Components get as props both the original dataTable and the annotated dataTable
  • inside components the updated mappings of values are applied to the annotated dataTable in order not to lose previous annotations
  • raw values are still displayed based on the original dataTable.

Fixes: #94

@surchs surchs requested a review from jarmoza March 28, 2022 20:05
@surchs
Copy link
Contributor Author

surchs commented Mar 28, 2022

@jarmoza: this won't work as is until #96 is addressed. Until then, you can use a quickfix by replacing mounted on the annotation.vue page with:

    mounted() {

        // 1. Set the current page name
        this.$store.dispatch("setCurrentPage", "annotation");

        // TODO: remove this
        if (this.dataTable.annotated === null) {
          console.log(" I am setting the annotated DataTable to be a copy of the original now!")


          this.$store.dispatch("saveAnnotatedDataTable", this.dataTable.original);
        }
    }

};

@jarmoza
Copy link
Contributor

jarmoza commented Mar 28, 2022

My recent commit clones the original data table when it is uploaded and saves the clone as the annotated table (see setDataTable() mutation in the store).

Copy link
Contributor

@jarmoza jarmoza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this is working.

@surchs surchs merged commit afa9add into master Mar 28, 2022
@surchs surchs deleted the fix-pass-datatable-to-props branch March 28, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dataTable updating must not conflict between categories
2 participants