Skip to content

Clicking an IconButton without on_click results in an error #1078

@iisakkirotko

Description

@iisakkirotko

Expected Behavior

Clicking the button does nothing.

Current Behavior

Clicking the button throws an error:

Traceback (most recent call last):
  File "/Users/iisakki/micromamba/envs/env/lib/python3.10/site-packages/reacton/ipyvue.py", line 23, in handler
    callback_ref.current(*args)
  File "/Users/iisakki/micromamba/envs/env/lib/python3.10/site-packages/solara/components/button.py", line 84, in <lambda>
    ipyvue.use_event(btn, click_event, lambda *_ignore: on_click and on_click())
  File "/Users/iisakki/micromamba/envs/env/lib/python3.10/typing.py", line 957, in __call__
    result = self.__origin__(*args, **kwargs)
TypeError: Can't instantiate abstract class Callable with abstract method __call__
This website runs on [Solara](https://solara.dev/)

Steps to Reproduce the Problem

See this PyCafe snippet

Specifications

  • Solara Version: 1.50.0
  • Platform: MacOS
  • Affected Python Versions: at least 3.10, probably all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions