From 1c45d79d57c2b187b35543ced07f439c73dd64d1 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Thu, 2 May 2024 16:09:07 +0300 Subject: [PATCH 1/5] Fix #6550: dropdown filter fix --- components/lib/dropdown/Dropdown.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index e7aec1cc90..5e610b189e 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -557,7 +557,10 @@ export const Dropdown = React.memo( if (option) { return option; } else if (groupIndex > 0) { - return findPrevOption({ group: groupIndex - 1, option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length }); + return findPrevOption({ + group: groupIndex - 1, + option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length + }); } return null; @@ -887,7 +890,7 @@ export const Dropdown = React.memo( }; const getOptionValue = (option) => { - return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option; + return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : ObjectUtils.resolveFieldData(option, 'value') || option; }; const getOptionRenderKey = (option) => { From 48e71a151b386d5a7d16bfa394e758832bb4b833 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Thu, 2 May 2024 16:11:25 +0300 Subject: [PATCH 2/5] Revert "Fix #6550: dropdown filter fix" This reverts commit 1c45d79d57c2b187b35543ced07f439c73dd64d1. --- components/lib/dropdown/Dropdown.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index 5e610b189e..e7aec1cc90 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -557,10 +557,7 @@ export const Dropdown = React.memo( if (option) { return option; } else if (groupIndex > 0) { - return findPrevOption({ - group: groupIndex - 1, - option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length - }); + return findPrevOption({ group: groupIndex - 1, option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length }); } return null; @@ -890,7 +887,7 @@ export const Dropdown = React.memo( }; const getOptionValue = (option) => { - return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : ObjectUtils.resolveFieldData(option, 'value') || option; + return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option; }; const getOptionRenderKey = (option) => { From e7b020e40faeeee0f6bb280bd08eb65924a93944 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Thu, 2 May 2024 16:12:41 +0300 Subject: [PATCH 3/5] Fix #6550: dropdown filter fix update --- components/lib/dropdown/Dropdown.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index e7aec1cc90..5e610b189e 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -557,7 +557,10 @@ export const Dropdown = React.memo( if (option) { return option; } else if (groupIndex > 0) { - return findPrevOption({ group: groupIndex - 1, option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length }); + return findPrevOption({ + group: groupIndex - 1, + option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length + }); } return null; @@ -887,7 +890,7 @@ export const Dropdown = React.memo( }; const getOptionValue = (option) => { - return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option; + return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : ObjectUtils.resolveFieldData(option, 'value') || option; }; const getOptionRenderKey = (option) => { From 7ac68e535f792d2b993a91e10e6a033014992f38 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Thu, 2 May 2024 16:13:30 +0300 Subject: [PATCH 4/5] Revert "Fix #6550: dropdown filter fix update" This reverts commit e7b020e40faeeee0f6bb280bd08eb65924a93944. --- components/lib/dropdown/Dropdown.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index 5e610b189e..e7aec1cc90 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -557,10 +557,7 @@ export const Dropdown = React.memo( if (option) { return option; } else if (groupIndex > 0) { - return findPrevOption({ - group: groupIndex - 1, - option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length - }); + return findPrevOption({ group: groupIndex - 1, option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length }); } return null; @@ -890,7 +887,7 @@ export const Dropdown = React.memo( }; const getOptionValue = (option) => { - return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : ObjectUtils.resolveFieldData(option, 'value') || option; + return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option; }; const getOptionRenderKey = (option) => { From 1bc437b51369c6b20730e97a5f659c1f90a1c53a Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Thu, 2 May 2024 16:15:32 +0300 Subject: [PATCH 5/5] Fix #6550: dropdown filter fix update --- components/lib/dropdown/Dropdown.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index e7aec1cc90..5e610b189e 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -557,7 +557,10 @@ export const Dropdown = React.memo( if (option) { return option; } else if (groupIndex > 0) { - return findPrevOption({ group: groupIndex - 1, option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length }); + return findPrevOption({ + group: groupIndex - 1, + option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length + }); } return null; @@ -887,7 +890,7 @@ export const Dropdown = React.memo( }; const getOptionValue = (option) => { - return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : option; + return props.optionValue ? ObjectUtils.resolveFieldData(option, props.optionValue) : ObjectUtils.resolveFieldData(option, 'value') || option; }; const getOptionRenderKey = (option) => {