@zendeskgarden/container-combobox
Advanced tools
Comparing version 1.1.4 to 2.0.0
@@ -47,4 +47,3 @@ /** | ||
} | ||
const key = typeof value === 'string' ? value : JSON.stringify(value); | ||
return labels[key]; | ||
return labels[value]; | ||
}; | ||
@@ -121,4 +120,3 @@ | ||
} | ||
const key = typeof option.value === 'string' ? option.value : JSON.stringify(option.value); | ||
labels[key] = option.label || key; | ||
labels[option.value] = option.label || option.value; | ||
}; | ||
@@ -377,3 +375,3 @@ options.forEach(option => { | ||
'data-garden-container-id': 'containers.combobox', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
onBlur, | ||
@@ -505,3 +503,3 @@ onClick, | ||
'data-garden-container-id': 'containers.combobox.input', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
ref: inputRef, | ||
@@ -603,3 +601,3 @@ role: role === null ? undefined : role, | ||
'data-garden-container-id': 'containers.combobox.tag', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
onClick: containerUtilities.composeEventHandlers(onClick, handleClick), | ||
@@ -617,3 +615,3 @@ onKeyDown: containerUtilities.composeEventHandlers(onKeyDown, handleKeyDown), | ||
'data-garden-container-id': 'containers.combobox.listbox', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
ref: listboxRef, | ||
@@ -632,3 +630,3 @@ role, | ||
'data-garden-container-id': 'containers.combobox.optgroup', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
role: role === null ? undefined : role, | ||
@@ -647,3 +645,3 @@ ...other | ||
'data-garden-container-id': 'containers.combobox.option', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
role, | ||
@@ -762,3 +760,3 @@ onMouseDown, | ||
inputValue: PropTypes.string, | ||
selectionValue: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), | ||
selectionValue: PropTypes.any, | ||
isExpanded: PropTypes.bool, | ||
@@ -765,0 +763,0 @@ defaultExpanded: PropTypes.bool, |
@@ -45,4 +45,3 @@ /** | ||
} | ||
const key = typeof value === 'string' ? value : JSON.stringify(value); | ||
return labels[key]; | ||
return labels[value]; | ||
}; | ||
@@ -119,4 +118,3 @@ | ||
} | ||
const key = typeof option.value === 'string' ? option.value : JSON.stringify(option.value); | ||
labels[key] = option.label || key; | ||
labels[option.value] = option.label || option.value; | ||
}; | ||
@@ -375,3 +373,3 @@ options.forEach(option => { | ||
'data-garden-container-id': 'containers.combobox', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
onBlur, | ||
@@ -503,3 +501,3 @@ onClick, | ||
'data-garden-container-id': 'containers.combobox.input', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
ref: inputRef, | ||
@@ -601,3 +599,3 @@ role: role === null ? undefined : role, | ||
'data-garden-container-id': 'containers.combobox.tag', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
onClick: composeEventHandlers(onClick, handleClick), | ||
@@ -615,3 +613,3 @@ onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown), | ||
'data-garden-container-id': 'containers.combobox.listbox', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
ref: listboxRef, | ||
@@ -630,3 +628,3 @@ role, | ||
'data-garden-container-id': 'containers.combobox.optgroup', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
role: role === null ? undefined : role, | ||
@@ -645,3 +643,3 @@ ...other | ||
'data-garden-container-id': 'containers.combobox.option', | ||
'data-garden-container-version': '1.1.4', | ||
'data-garden-container-version': '2.0.0', | ||
role, | ||
@@ -760,3 +758,3 @@ onMouseDown, | ||
inputValue: PropTypes.string, | ||
selectionValue: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), | ||
selectionValue: PropTypes.any, | ||
isExpanded: PropTypes.bool, | ||
@@ -763,0 +761,0 @@ defaultExpanded: PropTypes.bool, |
@@ -9,3 +9,3 @@ /** | ||
import { HTMLProps, ReactNode, RefObject } from 'react'; | ||
export type OptionValue = string | object; | ||
export type OptionValue = string; | ||
interface ISelectedOption { | ||
@@ -12,0 +12,0 @@ value: OptionValue; |
@@ -24,2 +24,2 @@ /** | ||
*/ | ||
export declare const toLabel: (labels: Record<string, string>, value: OptionValue) => string; | ||
export declare const toLabel: (labels: Record<string, string>, value?: OptionValue) => string; |
{ | ||
"name": "@zendeskgarden/container-combobox", | ||
"version": "1.1.4", | ||
"version": "2.0.0", | ||
"description": "Containers relating to Combobox in the Garden Design System", | ||
@@ -47,3 +47,3 @@ "license": "Apache-2.0", | ||
"zendeskgarden:src": "src/index.ts", | ||
"gitHead": "5ff98d333980549689bf928082ac2c6cd64cf96d" | ||
"gitHead": "92b2f51bced09699966a1e90ef5c86a659f45916" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80865
1729