Skip to content

Commit

Permalink
fix(protocol-designer): properly select and disable column dropdown o… (
Browse files Browse the repository at this point in the history
#16787)

…ption
closes RQA-3528
  • Loading branch information
jerader authored Nov 14, 2024
1 parent 3c4c33c commit 2daabbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/src/molecules/DropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
{filterOptions.map((option, index) => (
<React.Fragment key={`${option.name}-${index}`}>
<MenuItem
disabled={disabled ?? option.disabled}
disabled={option.disabled}
zIndex={3}
key={`${option.name}-${index}`}
onClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
]

Expand All @@ -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)
Expand Down

0 comments on commit 2daabbf

Please sign in to comment.