Dash Plotly - Create A Dropdown Menu Dynamically, Selection Of Multiple Rows, Table Export?
Solution 1:
What you would probably want to do here is create a callback for each dropdown (or a multi-output callback for all of them) that outputs to the
options
prop. Maybe triggered by updates to the table. You can initialize the dropdowns in the layout with a dummy dropdown option to start, and let the callback take it from there.I'm not sure whether the table does that on its own, but you could make your callback for the table do this. Because you can only have one callback per unique output, anything that involves updating the table's
data
prop would have to be run under the seam callback. You could probably add a button like "delete rows" to listen for asInput
, and use the data and selected rows asState
. When that button is clicked and fires the callback, you simply rebuild the dataframe for the table without rows in therows_selected
value, and then output to the table's data again.Sure. Export it how? You could set up a callback from a button, "export data" which could export it however you want. You could have the function dump the data to a file, or print it to the console, save it in a database, email it, or whatever you want basically. Anything you could do with Python really. The callback would need an output, so maybe just open a dialog or a snackbar letting the user know that the export request was received and started/completed.
Post a Comment for "Dash Plotly - Create A Dropdown Menu Dynamically, Selection Of Multiple Rows, Table Export?"