-
-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
enhancementNew feature or requestNew feature or requesttypescriptTypeScript-related pain pointTypeScript-related pain point
Description
#1954 added generics support to DataTable, which greatly enhances DX.
A similar experience should be applied to other components. This would allow passing arbitrary data without additional typing. Functionally, this should be backwards-compatible.
This applies to the items prop for:
- ComboBox
- Dropdown
- MultiSelect
This enables object properties to be automatically inferred.
<script lang="ts">
export let items = [
{ id: "0", text: "Slack", price: 100 },
{ id: "1", text: "Email", price: 200 },
{ id: "2", text: "Fax", price: 300 },
];
</script>
<ComboBox {items} let:item>
Item {item.price}
</ComboBox>brunnerh
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttypescriptTypeScript-related pain pointTypeScript-related pain point