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

Add data method for capturing item #3

Open
Nevraeka opened this issue Feb 23, 2015 · 7 comments
Open

Add data method for capturing item #3

Nevraeka opened this issue Feb 23, 2015 · 7 comments

Comments

@Nevraeka
Copy link
Member

Provide a method the is responsible for delegating to a url data fetch as an attribute or an explicit list declared as DOM nodes or local data

@Nevraeka
Copy link
Member Author

@csuwildcat - What is the preferred way for x-tag?

@csuwildcat
Copy link

First off, you may want to glance over these docs - they're way more detailed than x-tags.org: https://x-tag.readme.io/v1.0/docs (we're just finishing up the last bits before we switch to ReadMe). I noticed you had some functions in your lifecycle that aren't lifecycle callbacks. Any methods you want to add go under the methods: {} object. The methods object is a top-level object under your main register object definition.

As for your question, are you asking if there's a built-in fetch mechanism for something like a script tag's src attribute?

Nevraeka added a commit that referenced this issue Feb 23, 2015
@Nevraeka
Copy link
Member Author

Sorry about that. I moved those methods and I'll go through the docs in further detail ASAP. As far as my question goes, My instinct is to have a custom accessor with a url value that the element can use to fetch a item list of data. I could also have a set of declarative list items or do something else.

@Nevraeka
Copy link
Member Author

<x-carousel items="https://path/to/data_items"></x-carousel>

or/and

<x-carousel>
    <item name="first-item">item 1</item>
    <item name="second-item">item 2</item>
</x-carousel>

@csuwildcat
Copy link

So you want to use a url to do an async fetch of content, or something like datalist's child elements that it uses as the values for autocomplete?

@csuwildcat
Copy link

Datalist doc: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist

^ something like that?

@Nevraeka
Copy link
Member Author

Whichever x-tag philosophy prefers but yes either the declarative approach (not <datalist> per se because of the usage) or the implicit approach ( fetch or other)

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