Skip to content

Commit

Permalink
fix(custom): allow withCurrent on non-multi variables (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Duologic authored Mar 19, 2024
1 parent b64295d commit 6cdabe2
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions custom/dashboard/variable.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ local d = import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet';
),
withCurrent(key, value=key): {
local multi(v) =
if self.multi
&& std.isArray(v)
then v
else [v],
if std.get(self, 'multi', false)
&& !std.isArray(v)
then [v]
else v,
current: {
selected: false,
text: multi(key),
Expand Down
8 changes: 4 additions & 4 deletions gen/grafonnet-v10.0.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v10.1.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v10.2.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v10.3.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v10.4.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v9.4.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions gen/grafonnet-v9.5.0/custom/dashboard/variable.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6cdabe2

Please sign in to comment.