diff --git a/package.json b/package.json index 27906971..1e74129b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nih-sparc/sparc-design-system-components", - "version": "0.26.9", + "version": "0.26.10", "private": false, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/components/DropdownMultiselect/src/DropdownMultiselect.vue b/src/components/DropdownMultiselect/src/DropdownMultiselect.vue index 8e80f680..d08edb42 100644 --- a/src/components/DropdownMultiselect/src/DropdownMultiselect.vue +++ b/src/components/DropdownMultiselect/src/DropdownMultiselect.vue @@ -177,12 +177,6 @@ export default { }, }, watch: { - allVisibleDataIds(val) { - this.$refs.tree.filter(val) - }, - optionsExpanded: function() { - this.$refs.tree.filter() - }, 'visibleData': function() { this.setShowAll(); } @@ -194,6 +188,7 @@ export default { }) } if (this.showExpandOptionsContainer || this.visibleData !== undefined) { + this.numOptionsShown = 0; this.$refs.tree.filter() } }, @@ -274,6 +269,7 @@ export default { setOptionsExpanded(isExpanded) { this.numOptionsShown = 0; this.optionsExpanded = isExpanded + this.$refs.tree.filter() }, setShowAll: function() { const checkedNodes = this.visibleCheckedNodes diff --git a/src/stories/dropdownMultiselect/dropdownMultiselect.stories.js b/src/stories/dropdownMultiselect/dropdownMultiselect.stories.js index a988985c..9d21b09f 100644 --- a/src/stories/dropdownMultiselect/dropdownMultiselect.stories.js +++ b/src/stories/dropdownMultiselect/dropdownMultiselect.stories.js @@ -58,22 +58,6 @@ export const OneOption = () => createDemo( } ) -export const TwoOptions = () => createDemo( - { - label: 'Two Options', - id: '0', - data: [ - { - label: 'One', - id: '1', - }, - { - label: 'Two', - id: '2', - }] - } -) - export const NineOptions = () => createDemo( { label: 'Nine Options', diff --git a/src/stories/dropdownMultiselect/dropdownMultiselect.stories.mdx b/src/stories/dropdownMultiselect/dropdownMultiselect.stories.mdx index bb121a3f..4158ad53 100644 --- a/src/stories/dropdownMultiselect/dropdownMultiselect.stories.mdx +++ b/src/stories/dropdownMultiselect/dropdownMultiselect.stories.mdx @@ -54,39 +54,7 @@ data() { /> ``` -### Less than 5 options Dropdown Multiselect - -{stories.TwoOptions()} - -#### Code - -```js -data() { - return { - category: { - label: 'Two Options', - id: '0', - data: [ - { - label: 'One', - id: '1', - }, - { - label: 'Two', - id: '2', - }] - } - } -} -``` - -```html - -``` - -### Between 5 and 9 options Dropdown Multiselect +### Between 2 and 9 options Dropdown Multiselect {stories.NineOptions()}