Eric Liu

Results 252 comments of Eric Liu

> For part of users, this change increases runtime js size. Good point – a separate function would avoid the perf penalty. Do you have suggestions for what it could...

How are you importing icons? I'd recommend the direct import method, unless you are using [`optimizeImports`](https://github.com/carbon-design-system/carbon-preprocess-svelte#optimizeimports) from `carbon-preprocess-svelte`: ```js import Add16 from "carbon-icons-svelte/lib/Add16"; ```

Something to keep in mind when testing. Originally, the Svelte chart wrapper [invoked the `destroy` method](https://github.com/carbon-design-system/carbon-charts/pull/800/files#diff-8555e19e98e5aff33bd7e5a4ea107d0b9959cb013094ae07e9ab3bad58e8fdcbL33). However, it caused this bug: https://github.com/carbon-design-system/carbon-charts/issues/799. As a workaround, the component does the following...

Looks like the same issue as https://github.com/metonym/carbon-charts-svelte-examples/issues/1 I believe this is the [correct answer](https://github.com/metonym/carbon-charts-svelte-examples/issues/1#issuecomment-1020652446).

`$$restProps` is spread to the `Search` component, so you can pass a unique attribute to only style the targeted element: ```svelte :global([data-search-id="1"]) { /* ... */ } ```

You might need to increase the CSS specifity. Also, `data-svelte-typehead` is set on the outermost `div`, not the `input`. ```css :global([data-svelte-typeahead] [data-svelte-search] input) { background:red; } ``` It would be...

I like the idea of a "headless" Typeahead where the logic is shipped standalone.

A couple of things: - As much as possible, I prefer business logic *triggered by events* to be in the markup – even if it means duplication - I'm not...

A couple of requirements: - when all items are disabled, I get stuck in an infinite loop when using the arrow keys - `findIndex` is not supported in IE