mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-02 22:52:58 +00:00
fix(plugins): a built-in select in the compact sheet keeps its action name
The shared control named every icon-only select by its value ("Speed: Fast"),
including in the compact sheet, where the row already shows the value. The sheet
row is named by its action again ("Select speed"), as before the shared renderer.
This commit is contained in:
@@ -144,7 +144,8 @@ function describeControl(
|
||||
selectedId: String(item.value ?? ""),
|
||||
value: choiceLabel,
|
||||
iconOnly,
|
||||
tooltip: item.tooltip ?? (iconOnly ? `${item.title}: ${choiceLabel}` : item.title),
|
||||
// An icon-only trigger names its value; a sheet row shows the value, so it names the action.
|
||||
tooltip: iconOnly && !isSheet ? `${item.title}: ${choiceLabel}` : (item.tooltip ?? item.title),
|
||||
opensList: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ function toFeatureItem(
|
||||
return {
|
||||
...base,
|
||||
type: "select",
|
||||
tooltip: iconOnly ? undefined : getControlTooltip(control),
|
||||
tooltip: getControlTooltip(control),
|
||||
value: readSelectOption(control, options),
|
||||
choices: control.choices,
|
||||
iconOnly,
|
||||
|
||||
Reference in New Issue
Block a user