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

Is it possible to add scrollContainer attribute? #504

Open
Newcandy opened this issue Aug 10, 2022 · 2 comments
Open

Is it possible to add scrollContainer attribute? #504

Newcandy opened this issue Aug 10, 2022 · 2 comments

Comments

@Newcandy
Copy link

Description

Is it possible to add scrollContainer attribute ?
Maybe it can be realized in other way ?

eg:

__proto._init = function () {
    var _a;

    var _b = this.options,
        scrollContainerOption = _b.scrollContainer,
        containerOption = _b.container,
        containerTag = _b.containerTag,
        horizontal = _b.horizontal;
    var wrapper = this.wrapper;
    var scrollContainer = wrapper;
    var container = wrapper;
    var containerCSSText = "";

    if (!containerOption) {
      // scrollContainer = document.body;
      scrollContainer = scrollContainerOption instanceof HTMLElement ? scrollContainerOption : document.querySelector(scrollContainerOption);
      scrollContainer = scrollContainer || document.body;
      containerCSSText = container.style.cssText;
    } else if (containerOption === true) {
        // ...
    } else {
        // ...
    }
    // ...
}

so:

import { MasonryInfiniteGrid } from "@egjs/vue-infinitegrid";
<masonry-infinite-grid
     :container="false"
     :scrollContainer="#Id"
>
// ...
</<masonry-infinite-grid>

Thanks very much!

@Newcandy Newcandy changed the title Is it possible to add scrollContainer attribute? Is it possible to add a scrollContainer attribute? Aug 10, 2022
@Newcandy Newcandy changed the title Is it possible to add a scrollContainer attribute? Is it possible to add scrollContainer attribute? Aug 10, 2022
@daybrush
Copy link
Member

@Newcandy

okay. I'll add it.

@daybrush
Copy link
Member

daybrush commented Sep 2, 2022

@Newcandy

  • @egjs/infinitegrid 4.7.0
  • @egjs/react-infinitegrid 4.7.0
  • @egjs/svelte-infinitegrid 4.7.0
  • @egjs/vue-infinitegrid 4.7.0
  • @egjs/vue3-infinitegrid 4.7.0
  • @egjs/ngx-infinitegrid 4.7.0

scrollContainer option is added. Check it again.

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

No branches or pull requests

2 participants