File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/steps/MatchColumnsStep/utils Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ export const setColumn = <T extends string>(
1010) : Column < T > => {
1111 switch ( field ?. fieldType . type ) {
1212 case "select" :
13- const options = field . fieldType . options
13+ const fieldOptions = field . fieldType . options
1414 const uniqueData = uniqueEntries ( data || [ ] , oldColumn . index ) as MatchedOptions < T > [ ]
1515 const matchedOptions = autoMapSelectValues
16- ? uniqueData . map ( ( option ) => {
17- const value = options . find (
18- ( fieldOption ) => fieldOption . value === option . entry || fieldOption . label === option . entry ,
16+ ? uniqueData . map ( ( record ) => {
17+ const value = fieldOptions . find (
18+ ( fieldOption ) => fieldOption . value === record . entry || fieldOption . label === record . entry ,
1919 ) ?. value
20- return value ? ( { ...option , value } as MatchedOptions < T > ) : ( option as MatchedOptions < T > )
20+ return value ? ( { ...record , value } as MatchedOptions < T > ) : ( record as MatchedOptions < T > )
2121 } )
2222 : uniqueData
2323 const allMatched = matchedOptions . filter ( ( o ) => o . value ) . length == uniqueData ?. length
You can’t perform that action at this time.
0 commit comments