Dynamically generated html.Li list view get selected item


#1

I am working with list view in my project using dash html and it generates dynamically with back end data, Currently i have used html.Li component to generate this view and each item contains dropdown menu as well. Currently i am facing some issue when clicks drop-down menu option. I cannot get selected item as well as how to bind callback with button click. Kindly help me to solve this. Thanks a lot

   item = html.Li([
                html.Div([
                    html.Div([
                        html.Span('End Date : '+ '{:%B %d, %Y}'.format(datetime.now()), className='end-date-content'),
                        html.Div([
                                html.Div([
                                    html.P(className='arrow-button down'),
                                    html.Div([
                                        html.A(children=[
                                            html.Span('DEACTIVATE PROJECT',  className='main-nav-item')
                                        ]),
                                        html.A(children=[
                                            html.Span('DELETE PROJECT', className='main-nav-item')
                                        ])
                                    ], className='dropdown-content'),
                                ], className='dropdown'),
                            ]),
                        ], className="project-header-container"),
                    html.A(children=[
                        html.Img(src=data['logo_url'], className="project-logo"),
                        html.Span(data['project_name'], className='main-nav-item project-title')
                    ], className='project-icon-container')
                ], className =project-container')
    ], className='list-unstyled m-10')