Skip to content

[Bug]: filter state changes on app start #577

@chlebowa

Description

@chlebowa

What happened?

When specifying initial filters, enumerating factor levels in a non-alphabetical order causes the app to change the filter state, which results in filter state history before the user changes the filter.

library(teal)

filter <- teal_slices(
  teal_slice("i", "Species", selected = c("virginica", "versicolor"))
)

data <- teal_data() |> within({
  i <- iris
  m <- mtcars
  f <- faithful
})
app <- init(data, example_module(), filter)

runApp(app)

image

After changing filter to

filter <- teal_slices(
  teal_slice("i", "Species", selected = c("versicolor", "virginica"))
)

image

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions