Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/utils/propCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const GRID_MAYBE_FUNCTIONS = {
// Selection
isRowSelectable: 1,
fillOperation: 1,
checkboxes: 1,

// Sorting
postSortRows: 1,
Expand Down Expand Up @@ -170,6 +171,7 @@ export const GRID_NESTED_FUNCTIONS = {
detailGridOptions: 1,
csvExportParams: 1,
defaultCsvExportParams: 1,
rowSelection: 1,
};

/**
Expand Down Expand Up @@ -200,7 +202,6 @@ export const COLUMN_MAYBE_FUNCTIONS = {
// Columns
keyCreator: 1,
equals: 1,
checkboxSelection: 1,
icons: 1,
suppressNavigable: 1,
suppressKeyboardEvent: 1,
Expand All @@ -222,7 +223,6 @@ export const COLUMN_MAYBE_FUNCTIONS = {

// Columns: Headers
suppressHeaderKeyboardEvent: 1,
headerCheckboxSelection: 1,

// Columns: Rendering and Styling
cellStyle: 1,
Expand Down
28 changes: 28 additions & 0 deletions tests/examples/single_row_selection_remove_checkboxes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import dash_ag_grid as dag
from dash import Dash
import pandas as pd

app = Dash()

df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/ag-grid/olympic-winners.csv"
)

columnDefs = [{"field": i} for i in ["country", "year", "athlete", "age", "sport", "total"]]

app.layout = dag.AgGrid(
id="grid-row-selection-remove-checkboxes",
columnDefs=columnDefs,
rowData=df.to_dict("records"),
columnSize="sizeToFit",
dashGridOptions={
"rowSelection": {
'mode': 'singleRow',
# test selection checkboxes as function
'checkboxes': {"function": "params.data.year > 2007"}
},
}
)

if __name__ == "__main__":
app.run(debug=True)
Loading