@nyaruka/temba-components 0.173.1 → 0.174.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/temba-components.js +2 -2
- package/dist/temba-components.js.map +1 -1
- package/package.json +1 -1
- package/src/list/ContentList.ts +10 -7
package/package.json
CHANGED
package/src/list/ContentList.ts
CHANGED
|
@@ -2228,14 +2228,17 @@ export class ContentList<T = any> extends RapidElement {
|
|
|
2228
2228
|
if (path.some((n: any) => n?.classList?.contains?.('check-cell'))) {
|
|
2229
2229
|
return;
|
|
2230
2230
|
}
|
|
2231
|
+
const rowHref = this.getRowHref(item);
|
|
2232
|
+
const href = rowHref && this.isSafeHref(rowHref) ? rowHref : null;
|
|
2233
|
+
// Meta/ctrl-click opens a new tab, matching ordinary links. Skip
|
|
2234
|
+
// RowClick entirely — host pages navigate on it unconditionally,
|
|
2235
|
+
// which would also swap out the current page.
|
|
2236
|
+
if (href && (event.metaKey || event.ctrlKey)) {
|
|
2237
|
+
window.open(href, '_blank');
|
|
2238
|
+
return;
|
|
2239
|
+
}
|
|
2231
2240
|
this.fireCustomEvent(CustomEventType.RowClick, { item });
|
|
2232
|
-
|
|
2233
|
-
if (href && this.isSafeHref(href)) {
|
|
2234
|
-
// Meta/ctrl-click opens a new tab, matching ordinary links.
|
|
2235
|
-
if (event.metaKey || event.ctrlKey) {
|
|
2236
|
-
window.open(href, '_blank');
|
|
2237
|
-
return;
|
|
2238
|
-
}
|
|
2241
|
+
if (href) {
|
|
2239
2242
|
// Fire Redirected rather than assigning window.location so the
|
|
2240
2243
|
// host SPA frame swaps content in place instead of doing a full
|
|
2241
2244
|
// page reload — the frame listens for this event on document and
|