Skip to content

Commit

Permalink
fix: update call params for add tag function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-Topher committed Apr 8, 2024
1 parent e24294e commit e40f32f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const NodeConfigurationFields = (): JSX.Element => {
)}
externalSelectedTags={selectedTags}
name="tags"
onAddNewTag={(name, event) => {
onAddNewTag={(name) => (event) => {
setNewTagName(name);
openPortal(event);
}}
Expand Down
2 changes: 1 addition & 1 deletion src/app/base/components/TagSelector/TagSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const generateDropdownItems = ({
onClick={(e) => {
const cleanedFilter = sanitiseFilter(filter);
if (onAddNewTag) {
onAddNewTag(cleanedFilter.name, e);
onAddNewTag(cleanedFilter.name)?.(e);
setFilter("");
} else {
updateTags([...selectedTags, cleanedFilter]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const TagFormFields = ({
}
label={Label.TagInput}
name="added"
onAddNewTag={(name) => {
onAddNewTag={(name) => (_) => {
setNewTagName(name);
setSecondaryContent("addTag");
}}
Expand Down

0 comments on commit e40f32f

Please sign in to comment.