Merge pull request #780 from dod-ccpo/toggle-multiple

Toggle multiple
This commit is contained in:
George Drummond
2019-04-22 11:45:30 -04:00
committed by GitHub
6 changed files with 149 additions and 97 deletions

View File

@@ -1,14 +1,19 @@
import ToggleMixin from '../mixins/toggle'
export default {
name: 'toggler',
mixins: [ToggleMixin],
data: function() {
return {
selectedSection: null,
}
},
props: {
defaultVisible: {
type: Boolean,
default: () => false,
methods: {
toggleSection: function(sectionName) {
if (this.selectedSection === sectionName) {
this.selectedSection = null
} else {
this.selectedSection = sectionName
}
},
},
}