Skip to content

Adding a callback fails it's the second callback and both callbacks are either one or two character IDs #278

Open
@daattali

Description

@daattali

This was pretty difficult to nail down, but when an app contains one callback whose output ID is 1 or 2 characters long and you're trying to add another output with the same length ID, then you get an error:

Error: One or more outputs are duplicated across callbacks. Please ensure that all ID and property combinations are unique.

This is clearly an incorrect error.

For example, trying to add the following two callbacks to an app that doesn't have any callbacks yet:

app %>% add_callback(
  outputs = output("a", "children"),
  params = input("text", "value"),
  function(data) data
)

app %>% add_callback(
  outputs = output("b", "children"),
  params = input("text", "value"),
  function(data) data
)

Will error. If instead of a and b you use a1 and b2 it would also fail, as the rules above explain.

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