Select2 css is not implementing


Hello ,
I am using select2 dropdown search in react , but its css i think is not implementing as i am adding ;form-select' class with select but despite of it select2 dropdown layout is very common and unprofessional in metronic template react .As i want to apply dropdown search like it is in html .
here is the sample of code i used in react


<div classname="d-flex flex-column mb-7 fv-row">
<label classname="fs-6 fw-semibold mb-2">
<span classname="required">Department</span>
<i classname="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Department"></i>
</label>
<select classname="form-select form-select-solid fw-bold" name="departmentId" data-kt-select2="true" data-control="select2" id="departments" data-placeholder="Select a Department..." data-dropdown-parent="#kt_modal_add_user">
<option></option>
{MUMdepartmentsList?.map((department) => (
&lt;>
<option value="{department.id}">{department.departmentNameEn}</option>
>
))}
</select>
{formik.touched.departmentId &amp;&amp; formik.errors.departmentId &amp;&amp; (
<div classname="fv-plugins-message-container">
<div classname="fv-help-block">{formik.errors.departmentId}</div>
</div>
)}
</div>

Anybody can help me? Thanks
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Zahid,

For a solution, you can refer to my reply in this post.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

React Dev Vacancy

KeenThemes is looking for a Junior React or Vue developer to build awesome apps.
Apply
keenthemes mega bundle