Commit b7f90329 authored by Scott Stern's avatar Scott Stern Committed by Kushal Pandya

Fix errors when board sidebar is closed

parent c603a068
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
}, },
activeBoardItem: (state) => { activeBoardItem: (state) => {
return state.boardItems[state.activeId] || {}; return state.boardItems[state.activeId] || { iid: '', id: '', fullId: '' };
}, },
groupPathForActiveIssue: (_, getters) => { groupPathForActiveIssue: (_, getters) => {
......
...@@ -149,6 +149,9 @@ export default { ...@@ -149,6 +149,9 @@ export default {
}, },
}, },
methods: { methods: {
epicDatePopoverEl() {
return this.$refs?.epicDatePopover?.$el;
},
closeForm() { closeForm() {
this.$refs.editable.collapse(); this.$refs.editable.collapse();
this.$el.dispatchEvent(hideDropdownEvent); this.$el.dispatchEvent(hideDropdownEvent);
...@@ -249,12 +252,7 @@ export default { ...@@ -249,12 +252,7 @@ export default {
:aria-label="$options.i18n.help" :aria-label="$options.i18n.help"
data-testid="inherit-date-popover" data-testid="inherit-date-popover"
/> />
<gl-popover <gl-popover :target="epicDatePopoverEl" triggers="focus" placement="left" boundary="viewport">
:target="() => $refs.epicDatePopover.$el"
triggers="focus"
placement="left"
boundary="viewport"
>
<p>{{ $options.i18n.dateHelpValidMessage }}</p> <p>{{ $options.i18n.dateHelpValidMessage }}</p>
<gl-link :href="$options.dateHelpUrl" target="_blank">{{ <gl-link :href="$options.dateHelpUrl" target="_blank">{{
$options.i18n.learnMore $options.i18n.learnMore
......
...@@ -92,7 +92,7 @@ describe('Boards - Getters', () => { ...@@ -92,7 +92,7 @@ describe('Boards - Getters', () => {
it.each` it.each`
id | expected id | expected
${'1'} | ${'issue'} ${'1'} | ${'issue'}
${''} | ${{}} ${''} | ${{ id: '', iid: '', fullId: '' }}
`('returns $expected when $id is passed to state', ({ id, expected }) => { `('returns $expected when $id is passed to state', ({ id, expected }) => {
const state = { boardItems: { 1: 'issue' }, activeId: id }; const state = { boardItems: { 1: 'issue' }, activeId: id };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment