import { html } from '@design.estate/dees-element'; export const demoFunc = () => { const onChanged = (e: CustomEvent) => { // find the demo wrapper and update the 'changed' log inside it const wrapper = (e.target as HTMLElement).closest('.demoWrapper'); const el = wrapper?.querySelector('#changed'); if (el) el.textContent = `search-changed: ${e.detail.value}`; }; const onSubmit = (e: CustomEvent) => { // find the demo wrapper and update the 'submitted' log inside it const wrapper = (e.target as HTMLElement).closest('.demoWrapper'); const el = wrapper?.querySelector('#submitted'); if (el) el.textContent = `search-submit: ${e.detail.value}`; }; return html`
search-changed:
search-submit:
`; };