I am currently utilizing this Dropdown feature from Semantic UI, and I have a query regarding maintaining the top section unchanged even after selecting an option.
In the example provided by Semantic UI, the default selection is Gender; however, when one selects Male or Female, the displayed text changes to reflect the chosen value.
Is there a way to prevent this change so that the dropdown always displays "Gender," regardless of the selected option?
Here is the code snippet:
import Dropdown from '../Dropdown.component';
<Dropdown // Customized Dropdown based on Semantic UI
className="hello-dropdown"
placeholder="Company"
onChange={this.doSomething}
options={someOptions}
/>;
Dropdown.component
import React from 'react';
import { Dropdown } from 'semantic-ui-react';
import './Dropdown.styles.scss';
export default ({ placeholder, options, onChange, name, className }) => (
<Dropdown
className={className}
name={name}
placeholder={placeholder}
search
selection
options={options}
onChange={onChange}
clearable
/>
);
I suspect the solution lies within the placeholder={placeholder}
attribute, but I'm not entirely sure.