Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Custom UI Modal replaces the display of the issue activity panel

Kyle Hansen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 13, 2021

I am using the Jira Custom UI Modal in the jira issue activity panel. When clicking my button to call "open.modal", the modal opens. When clicking the select object I have on the modal, the issue activity scree behind the modal gets overwritten with what is on the modal screen (Select object and other buttons). I cannot figure out what is causing this overwrite to happen.

 

modal1.png

Above is the starting button of the app. Below is what happens when the button is clicked to open the modal. As you can see behind the modal, the original button has been overwritten.

modal3.png

Initial App code:

import React, { useEffect, useState} from 'react';
import { invoke, Modal } from '@forge/bridge';
import Button from '@atlaskit/button';



function App() {
const [data, setData] = useState(null);
const openModal = () => {
const modal = new Modal({
resource: 'time-entry-modal',
onClose: (payload) => {
console.log('onClose called with', payload);
},
size: 'medium',
context: {
customKey: 'custom-value',
},
});
modal.open();
};


return (
<div>

<Button onClick={openModal}>
Enter Time
</Button>

</div>
);
}

export default App;

Modal app code:

import React, { useEffect, useState} from 'react';
import {invoke, view} from '@forge/bridge';
import Button from '@atlaskit/button';
import Select from '@atlaskit/select';


function TimeEntryModal() {

const [data, setData] = useState(null);
return (
<div>

<Select
inputId="single-select-example"
className="single-select"
classNamePrefix="react-select"
options={[
{ label: 'Adelaide', value: 'adelaide' },
{ label: 'Brisbane', value: 'brisbane' },
{ label: 'Canberra', value: 'canberra' },
{ label: 'Darwin', value: 'darwin' },
{ label: 'Hobart', value: 'hobart' },
{ label: 'Melbourne', value: 'melbourne' },
{ label: 'Perth', value: 'perth' },
{ label: 'Sydney', value: 'sydney' },
]}
placeholder="Choose a city Modal"
/>

<Button appearance="primary" onClick={() => view.close()}>
Save
</Button>

<Button appearance="danger" onClick={() => view.close()}>Cancel</Button>
</div>
);

}

export default TimeEntryModal;

 

Any help would be appreciated.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events