mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
title prop added to multiselect
This commit is contained in:
parent
3faef7f7dc
commit
b815fb3da7
1 changed files with 3 additions and 2 deletions
|
|
@ -114,8 +114,8 @@ const Multiselect = ({ className, mode, direction, title, disabled, dataset, ren
|
|||
<div className={styles['menu-container']} onKeyDown={menuOnKeyDown} onClick={menuOnClick}>
|
||||
{
|
||||
options.length > 0 ?
|
||||
options.map(({ label, value }) => (
|
||||
<Button key={value} className={classnames(styles['option-container'], { 'selected': selected.includes(value) })} title={typeof label === 'string' ? label : value} data-value={value} onClick={optionOnClick}>
|
||||
options.map(({ label, title, value }) => (
|
||||
<Button key={value} className={classnames(styles['option-container'], { 'selected': selected.includes(value) })} title={typeof title === 'string' ? title : typeof label === 'string' ? label : value} data-value={value} onClick={optionOnClick}>
|
||||
<div className={styles['label']}>{typeof label === 'string' ? label : value}</div>
|
||||
<div className={styles['icon']} />
|
||||
</Button>
|
||||
|
|
@ -162,6 +162,7 @@ Multiselect.propTypes = {
|
|||
title: PropTypes.string,
|
||||
options: PropTypes.arrayOf(PropTypes.shape({
|
||||
value: PropTypes.string.isRequired,
|
||||
title: PropTypes.string,
|
||||
label: PropTypes.string
|
||||
})),
|
||||
selected: PropTypes.arrayOf(PropTypes.string),
|
||||
|
|
|
|||
Loading…
Reference in a new issue