Skip to content

Commit

Permalink
chore: adjust from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
philschanely committed Aug 23, 2022
1 parent 14c6be0 commit 62c7bf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<%
tag = component.sortable ? "ol" : "ul"
if component.tag.present?
tag = component.tag
end
tag = component.tag || tag
drag_handle_type = component.drag_handle_type.present? ? component.drag_handle_type : "default"
%>
<<%= tag %>
Expand Down
14 changes: 6 additions & 8 deletions packages/sage-react/lib/List/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export const List = ({
};

let Tag = sortable ? 'ol' : 'ul';
if (tag) {
Tag = tag;
}
Tag = tag || Tag;

return sortable ? (
<ReactSortable
Expand Down Expand Up @@ -76,7 +74,7 @@ export const List = ({
}
}}
setList={setList}
tag={tag}
tag={Tag}
>
{renderItems()}
</ReactSortable>
Expand All @@ -94,11 +92,11 @@ List.defaultProps = {
children: null,
className: null,
items: [],
itemRenderer: () => null,
itemRenderer: () => {},
dragHandleType: List.DRAG_HANDLE_TYPES.DEFAULT,
onEnd: () => null,
onStart: () => null,
setList: () => [],
onEnd: () => {},
onStart: () => {},
setList: () => {},
sortable: false,
tag: null,
};
Expand Down

0 comments on commit 62c7bf1

Please sign in to comment.