svelte-lazy icon indicating copy to clipboard operation
svelte-lazy copied to clipboard

add id to placeholder container

Open ghost opened this issue 3 years ago • 2 comments

Hi,

I have a project where some buttons scroll to divs placed down the website. If I put the id prop in the slot that is passed inside Lazy it will not exist when the button is clicked because rendering didn’t happen yet.

I propose to have a prop in Lazy for passing the id and apply it to the placeholder instead, in theory it should scroll to the placeholder position and render the content.

Shouldn’t be too difficult, I can make a PR let me know if this sounds ok.

ghost avatar Apr 18 '22 16:04 ghost

Hi, Good point, it would be great if you can make a PR for it.

leafOfTree avatar Apr 19 '22 01:04 leafOfTree

Sure thing, thanks for the quick reply, have a nice day!

ghost avatar Apr 19 '22 06:04 ghost