Hi guys, this is my code, but it’s ugly and not functional, is there a way that I can put a button literally inside a cell so that hover and icons work, remembering that the most I can use is dash, python , js and css
dag.AgGrid(
id='data-table',
className="ag-theme-alpine selection",
columnDefs=[
# Definição específica para a coluna 'Ação'
{
'headerName': 'Button',
'field': 'Button',
'editable': False,
'wrapText': False,
'autoHeight': True,
"cellClass": 'button-70',
}
]+[
{'headerName': i, 'field': i, 'editable': False, 'wrapText': False, 'autoHeight': False, "cellClass": 'center-aligned-cell', } for i in summary.columns if i not in ['x_coord', 'y_coord', 'Unique ID', 'Button'] #
],
rowData=summary.to_dict("records"),
columnSize="sizeToFit",
selectedRows=[],
defaultColDef={
"filter": True, # filtragem para todas as colunas
"sortable": True, # ordenação para todas as colunas
"resizable": True, # redimensionar colunas
"headerClass": 'center-aligned-header',
"autoHeaderHeight": True,
"wrapHeaderText": True,
},
dashGridOptions={
"pagination": True,
"animateRows": True,
"alwaysMultiSort": True,
"rowSelection": "multiple",
"rowMultiSelectWithClick": True
},
),
and the css of the UGLY button hahahahah
.button-70 {
background-image: linear-gradient(#0dccea, #0d70ea);
border: 0;
border-radius: 4px;
box-shadow: rgba(0, 0, 0, .3) 0 5px 15px;
box-sizing: border-box;
color: #fff;
cursor: pointer;
font-family: Montserrat,sans-serif;
font-size: .9em;
margin: 2px;
padding: 5px 3px;
text-align: center;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
Helps pls!