Skip to content

Commit 10e19a8

Browse files
committed
Merge remote-tracking branch 'origin/fix-view-attr' into fix-view-attr
2 parents 24bb592 + a7b56b5 commit 10e19a8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ These changes are available on the `master` branch, but have not yet been releas
1515
### Changed
1616

1717
### Fixed
18+
1819
- Fixed the `view` attribute on many view items being incorrect.
1920
([#2981](https://github.com/Pycord-Development/pycord/pull/2981))
2021

2122
### Deprecated
23+
2224
- Deprecated manually setting the `view` attribute on view items.
2325
([#2981](https://github.com/Pycord-Development/pycord/pull/2981))
2426

discord/ui/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ def remove_item(self, item: ViewItem[V] | int | str) -> Self:
262262

263263
def clear_items(self) -> Self:
264264
"""Removes all items from this view."""
265-
self.children.clear()
266265
for child in self.children:
267266
child.parent = None
267+
self.children.clear()
268268
return self
269269

270270
async def interaction_check(self, interaction: Interaction) -> bool:

0 commit comments

Comments
 (0)