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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Virtualizer): custom sizes management #46

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

amen-souissi
Copy link
Collaborator

@amen-souissi amen-souissi commented Mar 2, 2022

Your checklist for this pull request

馃毃Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the master branch (left side). Also you should start your branch off our master.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will pass linting.

Description

custom sizes management
Upgrade versions (use react 18)

鉂わ笍 Thank you!

@amen-souissi amen-souissi self-assigned this Mar 2, 2022
while (result.length < numberOfIndexesToAdd && itemIndex > 0) {
if (!ignoredIndexes.includes(itemIndex) && itemIndex < maxLength) {
if (currentSize < maxSize) {
while (itemIndex > 0 && currentSize <= maxSize) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can start from the first element in result

while (itemIndex > 0 && currentSize <= maxSize) {
const itemSize = customSizes[itemIndex] || defaultItemSize;
const newSize = currentSize + itemSize - 10;
if (!localIgnoredIndexes[itemIndex] && itemIndex < maxLength && newSize <= maxSize) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use const in order to have a better understanding of it

HyacintheK
HyacintheK previously approved these changes Mar 15, 2022
HyacintheK
HyacintheK previously approved these changes Oct 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants