Skip to content

Commit

Permalink
refactor: Changed folder structure of connectors (#1952)
Browse files Browse the repository at this point in the history
Co-authored-by: Susritha Sabbini <[email protected]>
  • Loading branch information
susrithasabbini and Susritha Sabbini authored Dec 18, 2024
1 parent e5ee018 commit e5bae80
Show file tree
Hide file tree
Showing 69 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/form/PillInput.res
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ let make = (~name, ~initialItems: array<string>=[], ~placeholder, ~duplicateChec
}
}

let toggleEditingItem = item => {
let toggleEditingItem = (item, event) => {
event->ReactEvent.Mouse.stopPropagation
setEditingItem(_ => Some(item))
setEditInput(_ => item)
}
Expand All @@ -129,6 +130,7 @@ let make = (~name, ~initialItems: array<string>=[], ~placeholder, ~duplicateChec
<div key={Int.toString(i)} className="flex flex-wrap gap-1 p-1 border rounded-md">
<RenderIf condition={editingItem == Some(item)}>
<input
onClick={event => event->ReactEvent.Mouse.stopPropagation}
type_="text"
value={editInput}
onBlur={_ => saveItem(item)}
Expand All @@ -139,7 +141,8 @@ let make = (~name, ~initialItems: array<string>=[], ~placeholder, ~duplicateChec
</RenderIf>
<RenderIf condition={editingItem != Some(item)}>
<div
className="cursor-pointer px-2 py-1 flex-grow" onClick={_ => toggleEditingItem(item)}>
className="cursor-pointer px-2 py-1 flex-grow"
onClick={event => toggleEditingItem(item, event)}>
{React.string(item)}
</div>
</RenderIf>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e5bae80

Please sign in to comment.