+
res.data);
+ },
+ async loadCellsFromHistory() {
+ const history = await this.loadCellHistoryFromServer();
+ history.map(cell => {
+ return {
+ cellId: cell.uuid,
+ };
+ }).forEach(cell => {
+ if (this.isCellAddedToTheEnd) {
+ this.shellCell.unshift(cell);
+ }
+ else {
+ this.shellCell.push(cell);
+ }
+ });
+ this.$nextTick(() => {
+ history.forEach((cell) => {
+ const uuid = cell.uuid;
+ const cellRef = this.$refs[this.getCellRefById(uuid)][0];
+ cellRef.loadEditorFromHistory(cell);
+ });
+ });
+ },
addCell() {
const cell = this.createCell();
if (this.isCellAddedToTheEnd) {
@@ -116,6 +139,9 @@ export default {
getCellRef(index) {
return `shell-cell-${this.shellCell[index].cellId}`;
},
+ getCellRefById(uuid) {
+ return `shell-cell-${uuid}`;
+ },
handleKeyDown(event) {
if (event.shiftKey && event.key === "Enter") {
event.preventDefault();