mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
Refactor prop types to omit redundant null
for null | HTMLElement
types (#998)
* refactor: omit redundant `null` prop type for HTMLElements * yarn build:lib * test: assert updated element prop types
This commit is contained in:
parent
d31e529ca9
commit
6de73f86fb
13 changed files with 40 additions and 35 deletions
|
@ -9,6 +9,7 @@
|
|||
];
|
||||
|
||||
let ref: ComboBox;
|
||||
let listRef: HTMLDivElement = null;
|
||||
|
||||
$: ref?.clear();
|
||||
</script>
|
||||
|
@ -19,6 +20,7 @@
|
|||
titleText="Contact"
|
||||
placeholder="Select contact method"
|
||||
items="{items}"
|
||||
bind:listRef
|
||||
/>
|
||||
|
||||
<ComboBox
|
||||
|
|
|
@ -9,13 +9,16 @@
|
|||
import CopyFile16 from "carbon-icons-svelte/lib/CopyFile16";
|
||||
import Cut16 from "carbon-icons-svelte/lib/Cut16";
|
||||
|
||||
let target: HTMLElement = null;
|
||||
let selectedId = "0";
|
||||
let selectedIds = [];
|
||||
|
||||
$: console.log("selectedId", selectedId);
|
||||
</script>
|
||||
|
||||
<ContextMenu open on:open="{(e) => console.log(e.detail)}">
|
||||
<div bind:this="{target}"></div>
|
||||
|
||||
<ContextMenu open on:open="{(e) => console.log(e.detail)}" bind:target>
|
||||
<ContextMenuOption
|
||||
kind="danger"
|
||||
indented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue