Skip to content

Commit

Permalink
use pagination in table example
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed Mar 4, 2024
1 parent ce565f6 commit dd89188
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
22 changes: 7 additions & 15 deletions examples/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,12 @@
])

st.subheader("Table")
columns = [
{
"field": 'id',
"label": 'ID',
"width": '40',
"numeric": True
},
{
"field": 'name',
"label": 'Name',
},
]
data = [
{ 'id': 1, 'name': 'Jesse' },
{ 'id': 2, 'first_name': 'John' },
{ 'id': 1, 'first_name': 'Jesse', 'last_name': 'Simmons', 'date': '2016/10/15 13:43:27', 'gender': 'Male' },
{ 'id': 2, 'first_name': 'John', 'last_name': 'Jacobs', 'date': '2016/12/15 06:00:53', 'gender': 'Male' },
{ 'id': 3, 'first_name': 'Tina', 'last_name': 'Gilbert', 'date': '2016/04/26 06:26:28', 'gender': 'Female' },
{ 'id': 4, 'first_name': 'Clarence', 'last_name': 'Flores', 'date': '2016/04/10 10:28:46', 'gender': 'Male' },
{ 'id': 5, 'first_name': 'Anne', 'last_name': 'Lee', 'date': '2016/12/06 14:38:38', 'gender': 'Female' }
{ 'id': 6, 'first_name': 'Johnny', 'last_name': 'Smith', 'date': '2015/11/06 11:12:43', 'gender': 'Male' }
]
sy.table(data=data, columns=columns, paginated=True)
sy.table(data=data)
2 changes: 1 addition & 1 deletion examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
streamfy==0.2.6
streamfy==0.2.8
streamlit==1.15.2

0 comments on commit dd89188

Please sign in to comment.