fix: Refactor Review Area according to new Text Editor (#15536)

- depends on https://github.com/frappe/frappe/pull/6159
This commit is contained in:
Faris Ansari
2018-09-30 21:08:46 +05:30
committed by Rushabh Mehta
parent 1cf71d96b1
commit 6575e52942
2 changed files with 75 additions and 11 deletions

View File

@@ -18,18 +18,19 @@ export default {
},
methods: {
make_input() {
this.message_input = new frappe.ui.CommentArea({
this.message_input = frappe.ui.form.make_control({
parent: this.$refs['comment-input'],
on_submit: (message) => {
this.message_input.reset();
this.$emit('change', message);
},
only_input: true,
no_wrapper: true
});
},
submit_input() {
if (!this.message_input) return;
const value = this.message_input.val();
const value = this.message_input.get_value();
if (!value) return;
this.message_input.submit();
}