File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11export type DropdownItem = {
22 title : string ;
33 href ?: string ;
4+ disabled ?: boolean ;
45} ;
56
67export type DropdownProps = {
@@ -50,8 +51,13 @@ export const Dropdown: React.FC<DropdownProps> = ({
5051 return (
5152 < div className = { `dropdown ${ classNames || "" } ` } >
5253 < select className = "dropdown__select" aria-label = { ariaLabel } >
53- { list . map ( ( { title } , index ) => (
54- < option key = { index } className = "dropdown__option" value = { title } >
54+ { list . map ( ( { title, disabled } , index ) => (
55+ < option
56+ key = { index }
57+ className = "dropdown__option"
58+ value = { title }
59+ disabled = { disabled !== undefined ? disabled : false }
60+ >
5561 { title }
5662 </ option >
5763 ) ) }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const FacetLine: FC<FacetLineProps> = ({ items }) => {
3434 < li className = "facet-line__item" >
3535 < Dropdown
3636 ariaLabel = "Choose periodical year"
37- list = { [ { title } , ...terms ] }
37+ list = { [ { title, disabled : true } , ...terms ] }
3838 arrowIcon = "chevron"
3939 classNames = "dropdown--grey-borders"
4040 />
You can’t perform that action at this time.
0 commit comments