<#4912 [BUG] Unable to input dataclass and optiona...
# flyte-github
c
#4912 [BUG] Unable to input dataclass and optional dataclass types in Flyte Console Issue created by lindseynield ### Describe the bug Given a custom
dataclass
input such as:
Copy code
@dataclass_json
@dataclass
class MyClass:
    a: str
    b: str
If a workflow contains an input of type
MyClass
and an optional input of type
MyClass
, we are unable to type in an input for the
MyClass
type in the Flyte Console. There does not appear to be type boxes for this input. ### Expected behavior I would be able to specify a value for both of these struct inputs in the Flyte Console. ### Additional context to reproduce
Copy code
from typing import Optional
from flytekit import task, workflow
from dataclasses import dataclass
from dataclasses_json import dataclass_json


@dataclass_json
@dataclass
class MyClass:
    a: str
    b: str


@task()
def my_task(input: MyClass):
    return

@workflow
def my_workflow(
    input: MyClass,
    optional_input: Optional[MyClass] = MyClass(a="", b="")  # Workaround for https://github.com/flyteorg/flyte/issues/4736
):
    my_task(input=input)
### Screenshots Screen.Recording.2024-02-16.at.3.13.29.PM.mov ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte