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

Reset mde field after submitting #16

Open
mark123jesper opened this issue Sep 19, 2021 · 1 comment
Open

Reset mde field after submitting #16

mark123jesper opened this issue Sep 19, 2021 · 1 comment

Comments

@mark123jesper
Copy link

mark123jesper commented Sep 19, 2021

After submitting the value on field I can't seem to empty it even after submitting

export default {
    props: ["questionSlug"],
    data() {
        return {
            form: {
                body: ""
            }
        };
    },
    methods: {
        submit() {
            axios
                .post(`/api/question/${this.questionSlug}/reply`, {
                    body: this.form.body
                })
                .then((response) => {
                this.form.body = ""
                EventBus.$emit("newReply", response.data.replies);
                })
                .catch(error => console.error(error)
                );
        }
    }
};

here is my code for that part

@trikarai
Copy link

#3

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

No branches or pull requests

2 participants