Skip to content

Commit

Permalink
Show all dict values on dict parameter editor open (#7000)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elmacioro authored Oct 9, 2024
1 parent 2bff90f commit f8a9fe4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ export const DictParameterEditor: ExtendedEditor<Props> = ({
setOpen(false);
}}
onOpen={async () => {
const fetchedOptions = await fetchProcessDefinitionDataDict(inputValue);
// On open we show all the options
const fetchedOptions = await fetchProcessDefinitionDataDict("");
setOptions(fetchedOptions);
setOpen(true);
}}
Expand All @@ -113,8 +114,10 @@ export const DictParameterEditor: ExtendedEditor<Props> = ({
inputValue={inputValue}
loading={isFetching}
renderOption={(props, option) => {
const isSelected = option.key === value?.key;
return (
<Box component={"li"} sx={menuOption({}, false, false) as SxProps<Theme>} {...props} aria-selected={false}>
// aira-selected is set to false as it overrides styles defined in our menuOption
<Box component={"li"} sx={menuOption({}, isSelected, false) as SxProps<Theme>} {...props} aria-selected={false}>
{option.label}
</Box>
);
Expand Down
1 change: 1 addition & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
* [#6840](https://github.com/TouK/nussknacker/pull/6840) Introduce canCastTo, castTo and castToOrNull extension methods in SpeL.
* [#6974](https://github.com/TouK/nussknacker/pull/6974) Add SpeL suggestions for cast methods parameter.
* [#6988](https://github.com/TouK/nussknacker/pull/6988) Remove unused API classes: `MultiMap`, `TimestampedEvictableStateFunction`
* [#7000](https://github.com/TouK/nussknacker/pull/7000) Show all possible options for dictionary editor on open.

## 1.17

Expand Down

0 comments on commit f8a9fe4

Please sign in to comment.