Remember checkbox settings in model picker popup (#2349)

Remember these checkboxes so they don't need to be re-checked every time.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
pull/2355/head
jimtng 2024-02-15 04:36:40 +10:00 committed by GitHub
parent 85f21bbec6
commit b30030fdda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -79,13 +79,14 @@ export default {
ModelTreeview
},
data () {
if (!this.$f7.data.modelPicker) this.$f7.data.modelPicker = {}
return {
ready: false,
loading: false,
initSearchbar: false,
includeNonSemantic: false,
includeItemName: false,
includeItemTags: false,
includeNonSemantic: this.$f7.data.modelPicker.includeNonSemantic || false,
includeItemName: this.$f7.data.modelPicker.includeItemName || false,
includeItemTags: this.$f7.data.modelPicker.includeItemTags || false,
expanded: false,
items: [],
links: [],
@ -292,14 +293,17 @@ export default {
this.rootGroups = []
this.rootItems = []
this.includeNonSemantic = !this.includeNonSemantic
this.$f7.data.modelPicker.includeNonSemantic = this.includeNonSemantic
this.load()
},
toggleItemName () {
this.includeItemName = !this.includeItemName
this.$f7.data.modelPicker.includeItemName = this.includeItemName
this.load()
},
toggleItemTags () {
this.includeItemTags = !this.includeItemTags
this.$f7.data.modelPicker.includeItemTags = this.includeItemTags
this.load()
},
toggleExpanded () {