Fix TextInput's is_persistent() flow

This commit is contained in:
yvqc authored and GitHub committed 2023-06-04 07:50:56 -04:00
1 parent a9bd698683
commit 6b6cbc44ce
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -162,10 +162,10 @@ class BaseSelect(Item[V]):
@custom_id.setter
def custom_id(self, value: str) -> None:
if not isinstance(value, str):
raise TypeError('custom_id must be None or str')
raise TypeError('custom_id must be a str')
self._underlying.custom_id = value
self._provided_custom_id = value is not None
self._provided_custom_id = True
@property
def placeholder(self) -> Optional[str]:
+3 -2
View File
@@ -137,10 +137,11 @@ class TextInput(Item[V]):
@custom_id.setter
def custom_id(self, value: str) -> None:
if not isinstance(value, str):
raise TypeError('custom_id must be None or str')
raise TypeError('custom_id must be a str')
self._underlying.custom_id = value
self._provided_custom_id = True
@property
def width(self) -> int:
return 5