Skip to content

Commit

Permalink
uses variable name when it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
joaovictor3g committed Apr 29, 2024
1 parent 74f5ba7 commit 0b0b808
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
1 change: 1 addition & 0 deletions web/assets/css/accordions.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
.editor__output-result-accordion .result-accordion-expansible-content {
transition: max-height 400ms, visibility 50ms;
overflow-x: auto;
overflow-y: hidden;
}

.editor__output-result-accordion[data-open="false"]
Expand Down
22 changes: 1 addition & 21 deletions web/assets/js/components/accordions/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function createLabel(item, name, i) {
arrowIcon.className = "ph ph-caret-right ph-bold result-arrow";

const span = document.createElement("span");
span.innerHTML = `${name}[${i}]`;
span.innerHTML = `${item?.name ? item.name : `${name}[${i}]`}`;

parentContainer.appendChild(arrowIcon);

Expand All @@ -90,26 +90,6 @@ function createLabel(item, name, i) {
parentContainer.appendChild(span);

return parentContainer;

// return `<div
// style="display: flex; align-items: center; gap: 0.5rem; position:relative"
// >
// <i class="ph ph-caret-right ph-bold result-arrow"></i>
// <div class="tooltip__container">
// ${
// item?.isError
// ? `<i class="ph ph-x-circle ph-fill" style="color: #e01e5a; z-index:999999" id="tooltip__trigger"></i>`
// : ""
// }
// <div id="tooltip__content" class="tooltip" style="right:0; top:0">
// <span class="tooltip__content--text">
// Validation compilation failed.
// </span>
// </div>
// </div>

// <span>${name}[${i}]</span>
// </div>`;
}

function renderAccordions(key, values, index = 0) {
Expand Down

0 comments on commit 0b0b808

Please sign in to comment.