Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Invalid prop for this component when using 0.7.0a2 #151

@HudsonMC16

Description

@HudsonMC16

Maybe this should be two separate issues, because I'm stuck in a loop trying to pick between the stable versions and 0.7.0a2. I'm running into issues where the callback doesn't fire when multiple files are uploaded when using 0.6.1, so I'd rather stick to 0.7.0a2.

The following simple example throws several errors when run:

primary_dropdown = (
    dcc.Dropdown(
        ['testing', 'this', 'option'],
        id='primary_dropdown',
        multi=True,
        clearable=True,
        searchable=True,
        style={'margin-top': 5},
    ),
)

file_selection = du.Upload(
    max_file_size=500,
    max_files=5,
    filetypes=['tdms'],
    id='dash_uploader',
    text='Drag and drop here or click to select file',
    default_style={
        'width': 175,
        'minHeight': 2,
        'lineHeight': 2,
        'borderWidth': '1px',
        'borderStyle': 'dashed',
        'borderRadius': '5px',
        'textAlign': 'center',
        'margin': '5px',
        'whiteSpace': 'normal',
    },
)


app.layout = dbc.Container(
    fluid=True,
    children=[
        dbc.Row(
            [
                dbc.Col(file_selection, width='auto'),
                dbc.Col(html.H5('Primary:'), width='auto', style={'margin-top': 10}),
                dbc.Col(primary_dropdown, width=True),

            ]
        ),
    ],
)

@du.callback(output=Output('primary_dropdown', 'options'), id='dash_uploader')
def parse_upload(status: du.UploadStatus):
    if status.is_completed:
        print(status)

if __name__ == '__main__':
    app.run(debug=True)

Running this app causes the following error five times for various properties of the du.UploadStatus object: dashAppCallbackBump, totalFilesSize, uploadedFilesSize, totalFilesCount, and uploadedFileNames

Invalid prop for this component
4:28:37 PM
Property "totalFilesSize" was used with component ID: "dash_uploader" in one of the State items of a callback. 
This ID is assigned to a dash_uploader.Upload_ReactComponent component in the layout, which does not 
support this property. This ID was used in the callback(s) for Output(s): primary_dropdown.options

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions