This is reproducible in dropdown multiple search selection
Cannot read property 'disabled' of undefined appears in console.This first came up to my local project and I reproduced in demo. This happens everytime you type to step 2 the first item of the list. E.g if you have the below list, you need to type "Angular"
This is also reproducible with or without the flag option.
After step 4 I expected to navigate up & down and be able to select another option.
JS error and cannot proceed with the selection of extra options.
0.75.1
This bug already solved ? I'm facing this too, i would like to help to solve this, how can i help?
@stelioschar I cannot replicate this on latest release can u cross check this once?
@sudheerDev yes. You can go here https://react.semantic-ui.com/modules/dropdown#dropdown-example-multiple-search-selection
The key is that you need to type as many keys as only one option is filtered.
@stelioschar Thanks i will give this a shot
There has been no activity in this thread for 90 days. While we care about every issue and we鈥檇 love to see this fixed, the core team鈥檚 time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one.
However, PRs for this issue will of course be accepted and welcome!
If there is no more activity in the next 90 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks!
This issue will be closed due to lack of activity for 6 months. If you鈥檇 like this to be reopened, just leave a comment; we do monitor them!
I'm having this issue with the following code
import React from 'react';
import { Form, Item } from 'semantic-ui-react';
const DropDown = ({options, selectedColor, onSelectedColorChange}) =>{
const renderedOptions = options.map( (option) =>{
if (option.value === selectedColor.value) {
return null;
}
return (
<Item
key={option.value}
onClick={() => onSelectedColorChange(option)}
>
{option.label}
</Item>
)
});
return (
<Form>
<Form.Dropdown
label='Select a Color'
selection
options={renderedOptions}
className='active visible' text={selectedColor.label}
/>
</Form>
)
}
export default DropDown
I'm basically trying to remove a currently selected item from the list displayed by the drop-down, and getting the same error
Update:
I changed the code to use the DropDown component instead of the Form.Dropdown and i get the same error
import React from 'react';
import { Form, Item, Dropdown } from 'semantic-ui-react';
const DropDownSelection = ({options, selectedColor, onSelectedColorChange}) =>{
const renderedOptions = options.map( (option) =>{
if (option.value === selectedColor.value) {
return null;
}
return (
<Item
key={option.value}
onClick={() => onSelectedColorChange(option)}
>
{option.label}
</Item>
)
});
return (
<Dropdown
placeholder='Select a color'
text={selectedColor.label}
options={renderedOptions}
selection
/>
// <Form>
// <Form.Dropdown
// label='Select a Color'
// selection
// options={renderedOptions}
// className='active visible' text={selectedColor.label}
// />
// </Form>
)
}
export default DropDownSelection
@afalahi it throws because you're returning null in renderedOptions, I suggest to modify code to filter our falsy values:
const renderedOptions = options
.map(option => {
if (option.value === selectedColor.value) {
return null;
}
return (
<Item key={option.value} onClick={() => onSelectedColorChange(option)}>
{option.label}
</Item>
);
})
.filter(Boolean);
Most helpful comment
@sudheerDev yes. You can go here https://react.semantic-ui.com/modules/dropdown#dropdown-example-multiple-search-selection
The key is that you need to type as many keys as only one option is filtered.