Skip to content

Commit

Permalink
wc: Remove commented code in displayResponseWarningEvents method #TAS…
Browse files Browse the repository at this point in the history
…K-7225
  • Loading branch information
jmjuanes committed Dec 16, 2024
1 parent 2a2cae0 commit 4e12223
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/webcomponents/commons/grid-commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,7 @@ export default class GridCommons {
if (eventsContainer && (response?.events?.length > 0 || response?.responses?.[0]?.events?.length > 0)) {
const events = [...(response?.events || []), ...(response?.responses?.[0]?.events || [])]
.filter(event => event && event.type === "WARNING" && !!event.message);
// .map(event => {
// return `
// <div class="alert alert-warning mb-2">
// <i class="fas fa-exclamation-triangle pe-1"></i>
// <span>${event.message}</span>
// </div>
// `;
// });
// If there are only one event message, just display it
// If there is only one event message, just display it
if (events.length === 1) {
const eventsContent = UtilsNew.renderHTML(`
<div class="alert alert-warning mb-2">
Expand All @@ -362,8 +354,6 @@ export default class GridCommons {
`).querySelector("div");
eventsContainer.replaceChildren(eventsContent);
} else if (events.length > 1) {
// const defaultVisibleEvents = events.length > maxVisibleEvents ? events.slice(0, maxVisibleEvents) : events;
// const defaultHiddenEvents = events.length > maxVisibleEvents ? events.slice(maxVisibleEvents) : [];
const eventsContent = UtilsNew.renderHTML(`
<div>
<div class="alert alert-warning mb-2">
Expand Down

0 comments on commit 4e12223

Please sign in to comment.