diff --git a/src/webcomponents/commons/grid-commons.js b/src/webcomponents/commons/grid-commons.js index 9ac28b0b3..51ade758f 100644 --- a/src/webcomponents/commons/grid-commons.js +++ b/src/webcomponents/commons/grid-commons.js @@ -324,13 +324,12 @@ export default class GridCommons { return columns; } - displayResponseWarningEvents(response) { + displayResponseWarningEvents(response, maxVisibleEvents = 3) { const eventsContainer = this.context.querySelector(`div#${this.gridId}WarningEvents`); 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); - if (events.length > 0) { - const eventsMessages = events.map(event => { + .filter(event => event && event.type === "WARNING" && !!event.message) + .map(event => { return `