From 5709d993ef8acc73cc103ddb8693bf30806afc15 Mon Sep 17 00:00:00 2001 From: Chris Haynes Date: Sat, 18 Jul 2020 22:56:18 +0100 Subject: [PATCH] Fixes #109 - ensure sl-form finds all nested controls --- src/components/form/form.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/form/form.tsx b/src/components/form/form.tsx index 35d5ed30d..1874b0be4 100644 --- a/src/components/form/form.tsx +++ b/src/components/form/form.tsx @@ -184,6 +184,7 @@ export class Form { const tags = this.formControls.map(control => control.tag); return slot .assignedElements({ flatten: true }) + .reduce((all, el) => all.concat(el, [...el.querySelectorAll('*')]), []) .filter(el => tags.includes(el.tagName.toLowerCase())) as HTMLElement[]; }