Skip to content

Instantly share code, notes, and snippets.

@celia-lm
celia-lm / app.py
Last active May 22, 2025 18:09
Fuzzy Search in Dash Ag Grid
import dash_ag_grid as dag
from dash import Dash, html, dcc, Input, Output, callback
import pandas as pd
app = Dash()
# adapted from https://dash.plotly.com/dash-ag-grid/text-filters#text-matcher
df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/ag-grid/olympic-winners.csv"
@celia-lm
celia-lm / NumberRangeAIO.py
Created August 27, 2024 15:08
Dash AIO component to have a Number Range selector where users can specify the min and max values in two linked dcc.Input of type="number"
from dash import Dash, Output, Input, State, html, dcc, callback, MATCH
import uuid
# All-in-One Components should be suffixed with 'AIO'
class NumberRangeAIO(html.Div): # html.Div will be the "parent" component
# A set of functions that create pattern-matching callbacks of the subcomponents
class ids:
minValueInput = lambda aio_id: {
'component': 'NumberRangeAIO',