First commit
This commit is contained in:
29
application/demo/comment/create/comment.saveButton.js
Normal file
29
application/demo/comment/create/comment.saveButton.js
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
import button from '/elements/button.js';
|
||||
|
||||
import tools from '/unify/tools.js';
|
||||
|
||||
|
||||
export default class saveCommentButton extends button {
|
||||
|
||||
label = "Create comment";
|
||||
|
||||
async click( event ){
|
||||
|
||||
var result = await this.socketManager.get( "table", "save", this.parent );
|
||||
|
||||
this.parent.create();
|
||||
|
||||
await this.parent.parent.commentsMessages.sync();
|
||||
|
||||
this.parent.parent.customElement.scrollTo( 0, this.parent.parent.customElement.scrollHeight);
|
||||
|
||||
console.log("laatste", this.parent.parent.customElement.scrollHeight);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user