New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove casting to user's custom type when passing data #385
base: develop
Are you sure you want to change the base?
Conversation
@@ -120,7 +120,7 @@ async def _process_item_callback( | |||
callback, | |||
self.managed(manager), | |||
manager, | |||
self.type_factory(data), | |||
data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like breaking normal select
@@ -181,7 +181,7 @@ async def _process_click( | |||
await self.on_item_click.process_event( | |||
callback, select, manager, self.type_factory(item_id), | |||
) | |||
await self._on_click(callback, select, manager, str(item_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, would it be correct to return type casting in Select
and remove it in StatefulSelect
(line 182)? Also make a condition if item_id
is the member of enum, then pass it as self.item_id_getter(item_id)
instead of just casting to str.
Any updates? |
Currently not enough time, too much work on me. I will try to fix the issue on the next week maybe |
This commit is aimed to fix issue with doublecasting when sequence of enum members is passed as items of Select-like widgets