🐛 fix(parameterComponent): remove unnecessary line break to improve code readability
🐛 fix(utils.ts): set 'type' property to an empty string instead of undefined to avoid potential issues
This commit is contained in:
parent
3f0cc57cd5
commit
b8e76b0be4
2 changed files with 3 additions and 2 deletions
|
|
@ -101,6 +101,7 @@ export default function ParameterComponent({
|
|||
|
||||
refHtml.current = groupedObj.map((item, i) => {
|
||||
const Icon: any = nodeIconsLucide[item.family];
|
||||
|
||||
return (
|
||||
<span
|
||||
key={getRandomKeyByssmm() + item.family + i}
|
||||
|
|
@ -127,7 +128,7 @@ export default function ParameterComponent({
|
|||
{nodeNames[item.family] ?? ""}{" "}
|
||||
<span className="text-xs">
|
||||
{" "}
|
||||
-
|
||||
{item.type == "" ? '' : ' - '}
|
||||
{item.type.split(", ").length > 2
|
||||
? item.type.split(", ").map((el, i) => (
|
||||
<React.Fragment key={el + i}>
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ export function groupByFamily(data, baseClasses, left, type) {
|
|||
groupedArray.forEach((object, index, self) => {
|
||||
const findObj = arrOfLength.find(x => x.type == object.family);
|
||||
if(object.component.length == findObj.length){
|
||||
self[index]['type'] = object.type;
|
||||
self[index]['type'] = "";
|
||||
}
|
||||
else{
|
||||
self[index]['type'] = object.component.join(', ');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue