Open spdev3000 opened 1 month ago
Truncated
When the text in sp-truncated gets changed dynamically the component should reflect that changes and update the text in the tooltip.
sp-truncated
Current behavior, see: https://studio.webcomponents.dev/edit/bvy2ZIJMtqH0wE2L1kO4/src/index.ts?p=stories
I used MutationController from @lit-labs/observers/mutation-controller.js to reflect textContent only changes from default slot with
new MutationController(this, { config: { characterData: true, childList: true, subtree: true, }, callback: () => { this.copyText() }, })
Code of conduct
Impacted component(s)
Truncated
Description of the requested feature
When the text in
sp-truncated
gets changed dynamically the component should reflect that changes and update the text in the tooltip.Mockups or screenshots
Current behavior, see: https://studio.webcomponents.dev/edit/bvy2ZIJMtqH0wE2L1kO4/src/index.ts?p=stories
Implementation notes or ideas
I used MutationController from @lit-labs/observers/mutation-controller.js to reflect textContent only changes from default slot with