shoelace icon indicating copy to clipboard operation
shoelace copied to clipboard

sl-input should create fewer native input elements

Open justinfagnani opened this issue 2 months ago • 1 comments

Describe the bug

sl-input creates two helper inputs to use native input date and number parsing. Inputs are farily heavyweight as far as elements go, and many sl-input instances might never be of type date or number, and so never need or use these helpers.

The helpers should probably be created lazily, and they don't need to be instance properties. One helper can be shared across all sl-input instances.

To Reproduce

See https://github.com/shoelace-style/shoelace/blob/64996b2d3512a13d2ec68146fb92164d03e07e6a/src/components/input/input.component.ts#L68

Demo

n/a

Screenshots

n/a

Browser / OS

all

Additional information

n/a

justinfagnani avatar Apr 12 '24 16:04 justinfagnani