Merge pull request #22 from LoredDev/1.0.1-update

fix(SubTaskInput): Hotfix on SubTaskInput not working properly
This commit is contained in:
Guz
2022-02-07 09:27:34 -03:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "ToToday",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "nuxt",

View File

@@ -6,7 +6,7 @@
</button>
<div class="subTaskInput">
<input
id="newSubTaskInputName"
:id="`newSubTaskInputName-parent${parent}`"
class="subTaskNameInput"
type="text"
name="subTaskNameInput"
@@ -36,7 +36,7 @@ export default Vue.extend({
if (sm.get('tasks') === undefined) sm.add('tasks', []);
const titleInput = document.querySelector(
'input#newSubTaskInputName'
`input#newSubTaskInputName-parent${parentId}`
) as HTMLInputElement;
const newTitle = titleInput.value;
@@ -47,14 +47,14 @@ export default Vue.extend({
(
document.querySelector(
'input#newSubTaskInputName'
`input#newSubTaskInputName-parent${parentId}`
) as HTMLInputElement
).className = titleInput.className;
setTimeout(() => {
(
document.querySelector(
'input#newSubTaskInputName'
`input#newSubTaskInputName-parent${parentId}`
) as HTMLInputElement
).className = titleInput.className.replace(' warnTitle', '');
}, 1500);
@@ -75,10 +75,11 @@ export default Vue.extend({
parentTask.subTasks.push(subTaskItem);
localTasks[parentId] = parentTask;
sm.set('tasks', localTasks);
(
document.querySelector('input#newSubTaskInputName') as HTMLInputElement
document.querySelector(`input#newSubTaskInputName-parent${parentId}`) as HTMLInputElement
).value = '';
},
},