Skip to content

Commit

Permalink
fix: label added as a key
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Dec 11, 2023
1 parent b056a85 commit bb6f212
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ module RenderConnectorInputFields = {
let keys =
details->Js.Dict.keys->Js.Array2.filter(ele => !Js.Array2.includes(keysToIgnore, ele))
keys
->Array.mapWithIndex((field, index) => {
->Array.map(field => {
let label = details->getString(field, "")
let formName = isLabelNested ? `${name}.${field}` : name
<UIUtils.RenderIf condition={label->Js.String2.length > 0}>
<div key={index->string_of_int}>
<div key={label}>
<FormRenderer.FieldRenderer
labelClass="font-semibold !text-hyperswitch_black"
field={switch (connector, field) {
Expand Down Expand Up @@ -225,11 +225,11 @@ module RenderConnectorLabel = {
let keys =
details->Js.Dict.keys->Js.Array2.filter(ele => !Js.Array2.includes(keysToIgnore, ele))
keys
->Array.mapWithIndex((field, index) => {
->Array.map(field => {
let label = details->getString(field, "")
let formName = isLabelNested ? `${name}.${field}` : name
<UIUtils.RenderIf condition={label->Js.String2.length > 0}>
<div key={index->string_of_int}>
<div key={label}>
<FormRenderer.FieldRenderer
labelClass="font-semibold !text-hyperswitch_black"
field={inputFieldForConnectorLabel(
Expand Down

0 comments on commit bb6f212

Please sign in to comment.