Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -225,9 +225,9 @@ def display_pet_card(pet, is_favorite=False):
|
|
225 |
col1, col2 = st.columns(2)
|
226 |
with col1:
|
227 |
if st.button("View Details", key=f"details_{pet['id']}"):
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
|
232 |
with col2:
|
233 |
if not is_favorite:
|
|
|
225 |
col1, col2 = st.columns(2)
|
226 |
with col1:
|
227 |
if st.button("View Details", key=f"details_{pet['id']}"):
|
228 |
+
if st.session_state.selected_pet != pet['id']:
|
229 |
+
st.session_state.selected_pet = pet['id']
|
230 |
+
st.experimental_rerun() # Force immediate rerun
|
231 |
|
232 |
with col2:
|
233 |
if not is_favorite:
|