Always use last value as a fallback for Select.values

This commit is contained in:
Rapptz 2022-08-14 15:50:16 -04:00
parent 9c38cf3aef
commit ff1dd586d3

View File

@ -263,8 +263,8 @@ class Select(Item[V]):
@property @property
def values(self) -> List[str]: def values(self) -> List[str]:
"""List[:class:`str`]: A list of values that have been selected by the user.""" """List[:class:`str`]: A list of values that have been selected by the user."""
values = selected_values.get(None) values = selected_values.get({})
return self._values if values is None else values.get(self.custom_id, []) return values.get(self.custom_id, self._values)
@property @property
def width(self) -> int: def width(self) -> int: