I have a select option and I want to link the user to another comp when clicked everything going well,the user is redirected and see the comp. But, the option doesn't change in the select label, and still shows the first option all the time. see code below:
`
<Select portfolio dir="rtl"
onChange={(e)=>{
history.push(`${e.target.value}`);
}}>
<Option value='/account/details'>details</Option>
<Option value='/account/projects' >projects</Option>
<Option value='/account/changepassword'>pass</Option>
{user&& (
<Option value='/account/requests'>messages</Option>
)}
</Select>
);
};
`
edit i use the regular select input . and still dont understand the problem. in other component i have this select option (without link) and its work and change the "title text" op the option when i change.
its looking the same and its work:
<Select small dir="rtl"
onChange={(e)=>{
return catFilter(e.target.value)
}}>
<Option key='' value=''>all</Option>;
{categories&&categories.map((opt, key) => {
return <Option key={key} value={opt.id}>{opt.fullName}</Option>;
})}
</Select>
i dont see the difference...