bugfix for tags

main
HerrHase 2 years ago
parent 79c51cd9db
commit 11ea3291bb

@ -2,7 +2,7 @@
<div class="field-tags"> <div class="field-tags">
<select name="{ state.options.name }[]" multiple style="display: none;"> <select name="{ state.options.name }[]" multiple style="display: none;">
<option each={ tag in state.tags } value={ tag }></option> <option each={ tag in state.tags } value={ tag } selected></option>
</select> </select>
<label class="field-label"> <label class="field-label">
@ -30,7 +30,7 @@
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<script> <script>
@ -155,8 +155,6 @@
this.state.tags.push(value) this.state.tags.push(value)
this.update() this.update()
// select new option
this.$('select option[value="' + value + '"]').selected = true
this.$('input').value = '' this.$('input').value = ''
} else if (value.length === 0) { } else if (value.length === 0) {
this.state.errors.push('Required!') this.state.errors.push('Required!')

@ -86,9 +86,9 @@ class AppsDatabase extends DatabaseHandler {
if (entry && entry[key]) { if (entry && entry[key]) {
fileHandler.remove(entry[key]) fileHandler.remove(entry[key])
} }
}
file = fileHandler.put(file.name, file.type, file.data) file = fileHandler.put(file.name, file.type, file.data)
}
return file return file
} }

Loading…
Cancel
Save