How to add a button to an antd List component

I want to add a button component to the list list component, as shown in the figure, how to do it

               <List
                 size="small"
                 header={<div></div>}
                 split={false}
                 gutter={-10}
                 bordered={false}
                 dataSource={data}
                 renderItem={item => (<List.Item>{item}</List.Item>)}
               />
           
           
           
May.06,2022

directly write a < Button > and then set CSS absolute positioning settings top and lefe to navigate to the specified location


at the end, judge the last item, and then in renderItem= {(item, index) = > < List.Item > {item} {index = data.length-1? < Button > button < / Button >: null} < / List.Item >

if it is a specified item, item should be used to determine which item it is. The specific conditions need to be determined by yourself


modify the corresponding content in renderItem= {item = > (< List.Item > {item} < / List.Item >) here item , and add a button.

Menu