Releases: pip-install-python/dash-dynamic-grid-layout
v0.0.5
✅ - Setup Dynamic Grid Layout & Dynamic Grid Wrappers
✅ - Setup Edit Mode and Display Mode
✅ - Snap to Grid functionality
✅ - Auto Resizes on different screen sizes and returns to previous screen layout on scale back up
✅ - Add new wrapped components to grid dynamically
✅ - Dynamically Set wrapper width, height and position via callback on add
✅ - Persistence on state when refreshing initial grid layout after movement or resizing has taken place
✅ - Props for Wrappers to change color, background color and text of draggable bar
✅ - Custom style for entering on edit mode and scaled 10% smaller to allow easier handling of wrappers
🪲 - Bug with other browsers outside Crome breaking
Also in this update we removed the prop newItemTemplate from DashGridLayout and opted for a callback setup like so for adding new items into the grid layout:
@callback(
Output("grid-layout", "items"),
Output("grid-layout", "itemLayout"),
Input("add-dynamic-component", "n_clicks"),
prevent_initial_call=True,
)
def add_dynamic_component(n):
if n:
items = Patch()
new_id = generate_random_string(10)
items.append(dgl.DraggableWrapper(
dcc.Graph(
figure=px.scatter(
df, x="petal_width", y="petal_length", color="species"
),
style={"height": "100%"},
),
id=f'{new_id}'
))
itemLayout = Patch()
itemLayout.append({'i': f'{new_id}', 'w': 6})
return items, itemLayout
return no_update, no_update