8000 Can't get the selectr instance after instantiated · Issue #87 · Mobius1/Selectr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
Can't get the selectr instance after instantiated #87
Closed
@GlauberrBatista

Description

@GlauberrBatista

Hi,
I'm initializing all the selects in my page that contains a specific data attribute (e.g., data-context="selectr") on page load. However, I'm not storing the instances in variables, since there are several selects on that page. So, I need to update/enable/disable some selects and I didn't find a way to get the instance attached to the select component. By doing Selectr('#foo') I get an error and creating a new instance with new Selectr('#foo') will generate another selectr.
In Select2, for instance, if we call $el.select2('#foo') we will get the instance attached to that select, but I didn't find anything like this in selectr.

Is there a way to get the selectr instance attached to a select, or is this a bug? Or is it by design?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0