From 2daabbff21e133f5f095e73dd3a9d671fb304f8d Mon Sep 17 00:00:00 2001 From: Jethary Alcid <66035149+jerader@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:26:18 -0500 Subject: [PATCH] =?UTF-8?q?fix(protocol-designer):=20properly=20select=20a?= =?UTF-8?q?nd=20disable=20column=20dropdown=20o=E2=80=A6=20(#16787)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …ption closes RQA-3528 --- components/src/molecules/DropdownMenu/index.tsx | 2 +- .../StepForm/PipetteFields/PartialTipField.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/src/molecules/DropdownMenu/index.tsx b/components/src/molecules/DropdownMenu/index.tsx index 8f0265449e8..851e759abca 100644 --- a/components/src/molecules/DropdownMenu/index.tsx +++ b/components/src/molecules/DropdownMenu/index.tsx @@ -285,7 +285,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { {filterOptions.map((option, index) => ( { diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/PartialTipField.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/PartialTipField.tsx index afb321e8628..1410bbfda40 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/PartialTipField.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/PartialTipField.tsx @@ -32,6 +32,10 @@ export function PartialTipField(props: FieldProps): JSX.Element { name: t('column'), value: COLUMN, disabled: tipracksNotOnAdapter.length === 0, + tooltipText: + tipracksNotOnAdapter.length === 0 + ? t('form:step_edit_form.field.nozzles.option_tooltip.COLUMN') + : undefined, }, ] @@ -50,7 +54,9 @@ export function PartialTipField(props: FieldProps): JSX.Element { dropdownType="neutral" filterOptions={options} title={t('select_nozzles')} - currentOption={options[0]} + currentOption={ + options.find(option => option.value === selectedValue) ?? options[0] + } onClick={value => { updateValue(value) setSelectedValue(value)