Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

select2 for reactjs


hi
i am unable to get select2 multi-select dropdowns for react

i dont see the docs link either
https://preview.keenthemes.com/metronic8/react/docs/select2

i have checked the demo1 code and seeing the Dropdown1.tsx example

tried with 2 options:
<select className='form-select form-select-solid' data-control="select2"
and
<select className='form-select form-select-solid' data-kt-select2='true'

both unsuccessful, please help with a working reactjs select2 example


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Hello, as a result of the information you provided, I included react sellect in the react project, but I can't assign a value value value. I keep getting warnings, can you please give me a prefix. As you said, there are a lot of documents, but I could not integrate it into the metronic react side. I share the screenshot with you.



Hi,

We don't have select2 in React (Angular, Vue) cause it's based on jQuery, we don't use jQuery in our SPA apps.
We recommend to use react-select instead, it has a great documentation and examples.

Regards,
Keenthemes support


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(