Skip to content

Multi-container bugs with duplicated items #7

@rtonoue

Description

@rtonoue

Abstract

If there is duplicated items in multi-container, moving item results in breaking widget layout as below.

In this example, items named "C" are duplicated.

2023-02-07.11-49-35.mp4

Reproducible code

import streamlit as st
from streamlit_sortables import sort_items

original_items = [
    {'header': 'first container',  'items': ['A', 'B', 'C', "C"]},
    {'header': 'second container', 'items': ['D', 'E', 'F']}
]

sorted_items = sort_items(original_items, multi_containers=True)

st.write(f'original_items: {original_items}')
st.write(f'sorted_items: {sorted_items}')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions