Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type: select limited to 1000 options maximum #2728

Closed
JTNMW opened this issue Jul 23, 2021 · 5 comments
Closed

Type: select limited to 1000 options maximum #2728

JTNMW opened this issue Jul 23, 2021 · 5 comments

Comments

@JTNMW
Copy link
Contributor

JTNMW commented Jul 23, 2021

Type: select fields retrieving option values from contentTypes with 1000+ records only show first 1000 values.

Is there scope for infinite Scroll (with autocomplete/search) to be implemented to type: select to allow unlimited dropdown options to be available
https://vue-select.org/guide/infinite-scroll.html

@bobdenotter
Copy link
Member

Hi, what do you mean by 'Is there scope for' ?

It's not on my immediate to-do list, but we'd happily welcome PR's / code contributions. :-)

(you can override the limit in contenttypes.yaml too, IIRC)

@JTNMW
Copy link
Contributor Author

JTNMW commented Jul 28, 2021

hi bob, raising the limit in contenttypes.yaml doesn't seem to have an effect once you get beyond 1000.

If the limit is set to over 1000 the array of options returned is increased (i've checked this by dumping the options var in select.html.twig and i can get more than 1000 results), but it seems that it is the Vue.js component itself that is then limiting the number of options displayed in the select dropdwon to 1000 max.

I've being trying to build in the infinite scroll function into the select.vue component, but not sure how to get changes in the select.vue to be cascaded to the main bolt.js. Im just not familiar enough with vue.js, webpack etc. What do i need to do to get changes in vue components to be represented in the Bolt CMS. If i can do this and find a fix, i'd be more than happy to PR!

@bobdenotter
Copy link
Member

You might need to rebuild the files.

cd vendor/bolt/core
npm install
npm run build

(chug chug chug)

cp -rf public/assets/* ../../../public/assets

@JTNMW
Copy link
Contributor Author

JTNMW commented Aug 4, 2021

Hopefully resolved with PR #2750. The number of options displayed will now match the value given in the limit: property of the field in the contentType.yaml. If no limit is set it defaults to 99999.

@bobdenotter
Copy link
Member

Fixed in #2750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants