Questions tagged [lit-html]

Lit is a JS web component library. Lit HTML is the render component that uses tagged template literals to only update the parts of the DOM that have changed. Use this tag on questions related to using it standalone, and in components other than those based on LitElement.

is a JS web component library.

Lit HTML uses tagged template literals to build DOM that can be reused. It can be used standalone to build components or render DOM without the .

236 questions
0
votes
1 answer

Blur event is firing on keydown

I need to get an input value on enter press and also on blur event. So I have created 2 functions: Handling blur event byBlur(e) { const text = e.currentTarget.value; …
Ian
  • 77
  • 1
  • 9
0
votes
1 answer

grouping tr but browser closes tbody prematurely

When using LitElement to render data dynamically, the browser inserts tbody all the time negating any effort to "group" table rows. render() { return html` …
user3757849
  • 199
  • 2
  • 14
0
votes
1 answer

Lit-html target a DOM node

Imagine I have a template with a button and a spinner next to it. How can I tell the spinner to show up when the button is pressed? return `html
` I want to be able in…
Jojolatino
  • 696
  • 5
  • 11
0
votes
1 answer

Websocket clients override connections of each other

I am trying to implement a Server-Client example with a Nodejs express server and a LitComponent-Client. Communication between server and client works perfectly when running an 1:1 configuration. When starting a second client the transmission of…
StephanB
  • 315
  • 2
  • 17
0
votes
3 answers

Prevent DOM reuse within lit-html/lit-element

I am looking for a way to NOT reuse DOM elements within lit-html/lit-element (yes, I know, I'm turning off one of the prime features). The particular scenario is moving an existing system to lit-element/lit-html that at certain points embeds the…
0
votes
1 answer

Lit-Element - Types have separate declarations of a private property

Trying to compile a typescript project that uses lit-element and lit-html and has dependencies to other projects that use lit-html too gives me the error .../lit-html/lib/parts").NodePart' is not assignable to type…
Jose Ospina
  • 2,097
  • 3
  • 26
  • 40
0
votes
0 answers

HTML DOM Select not working as expected on lit-html

I'm not sure if there's something wrong with my code or it's an existing bug with lit-html? I'm trying to get value of the selected item when button is clicked. number.js