Skip to content

allow passing parameters to custom panels #6

@ikitommi

Description

@ikitommi

currently the panel-functions are 0-arity. To write reusable panels, there should be a way to pass parameters to them. Few suggestions:

1) pass the start! options to panels

(defn permissions-view [{:keys [permissions]}]
  ...)

(dev-tools/start!
 {:state-atom re-frame.db/app-db
  :permissions #{:a :b}
  :panels-fn {:permissions {:label "Permissions" :fn permissions-view}}})

2) like 1, but just one key, e.g. :data

(dev-tools/start!
 {:state-atom re-frame.db/app-db
  :data {:permissions #{:a :b}}
  :panels-fn {:permissions {:label "Permissions" :fn permissions-view}}})

3) something else

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