From d23ff283206d1118577a5155642b89777323d7d2 Mon Sep 17 00:00:00 2001 From: Aron Atkins Date: Fri, 13 Sep 2024 08:34:27 -0400 Subject: [PATCH] more thorough explanation of input control inference --- NEWS.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e79a41b307..9481647838 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,25 @@ rmarkdown 2.29 - `find_external_resources()` now correctly detects knitr child document provided with option like `child = c("child.Rmd")` (thanks, @rempsyc, #2574). -- A parameter allowing multiple selections uses a select input control by default regardless of the number of choices. +- `knit_params_ask()` uses a `select` input for parameters which allow multiple selected values. Previously, a `radio` input was incorrectly used when the parameter had a small number of choices. + + ```yaml + params: + primaries: + choices: ["red", "yellow", "blue"] + multiple: true + ``` + + When `multiple` is not enabled, parameter configuration still uses `radio` when there are fewer than five choices. + + The `input` parameter field can still be used to force the configuration control. + + ```yaml + params: + grade: + input: radio + choices: ["A", "B", "C", "D", "F"] + ``` rmarkdown 2.28