S
S
seryozhasa2018-07-06 14:50:03
Yii
seryozhasa, 2018-07-06 14:50:03

Similar products in yii2?

On the product edit page, I use select2 from kartik to display all products to indicate similar ones. Everything was fine until the moment when there were several tens of thousands of products, because of which everything naturally slows down on the page.
So here's the question. Is it possible to force select2 to load products from the database while entering a value in its search field? If not, what other options are there to solve this problem.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2018-07-06
@seryozhasa

Is it possible to force select2 to load products from the database while entering a value in its search field?

It's kind of what it's usually used for. I advise you to read to the end the documentation for the solutions you use:
demos.krajee.com/widget-details/select2#usage-ajax

G
Gleb Starkov, 2018-07-06
@colonel

Can be loaded from the server via AJAX

A
Alexey Skobkin, 2018-07-06
@skobkin

Have you tried opening the documentation ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question