Topic: Select component placeholder text
emmdb priority asked 9 months ago
import React from 'react'; import { MDBSelect } from 'mdb-react-ui-kit';
export default function App() { return ( ); }
Question: For me "hidden: true" is not working, It is taking directly second text which is { text: 'One', value: 1 },
Mateusz Lazaru staff answered 8 months ago
I'll add a task to fix that. Adding defaultSelected: true
to the hidden option will do what you expect.
<MDBSelect
data={[
{ text: 'One', hidden: true, defaultSelected: true },
{ text: 'Two', value: 2 },
{ text: 'Three', value: 3 },
]}
/>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB React
- MDB Version: MDB5 5.0.0
- Device: Lenovo Thinkpad
- Browser: Chrome
- OS: Windows 11
- Provided sample code: No
- Provided link: No