I have requirement where I want to open modal on clicking a detail list row.
We are using office ui fabric
.
Asked
Active
Viewed 564 times
0

Apostolos
- 10,033
- 5
- 24
- 39

Lokesh Nagilla
- 1
- 1
-
Hi and welcome to SO. Please provide some code and what you have try so far. Thanks. – Marko Savic Oct 02 '21 at 10:06
-
Please provide enough code so others can better understand or reproduce the problem. – Community Oct 07 '21 at 17:00
1 Answers
0
This is detail List
<DetailsList
items={todos}
columns={column}
className={styles.detailList}
compact={true}
/>
add the columns using state and open the dialog onRender
const [column, setColumn] = useState<IColumn[]>([
{ key: 'column1', name: 'Title', fieldName: 'Title', minWidth: 100, maxWidth: 200, isResizable: false },
{ key: 'column2', name: 'Description', fieldName: 'description', minWidth: 100, maxWidth: 200, isResizable: false },
{ key: 'column4', name: 'Edit', fieldName: 'edit', minWidth: 100, maxWidth: 100, isResizable: false,
onRender: (item) => (
<Link onClick={() => toggleHideDialog()}>Edit</Link>
),
},
{ key: 'column5', name: 'Delete', fieldName: 'delete', minWidth: 100, maxWidth: 100, isResizable: false,
onRender: (item) => (
<Link onClick={() => { console.log('clicked', item); }}>Delete</Link>
),
},
])

Yasir Ali
- 111
- 1
- 6