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

v0.10.0 #335

Merged
merged 19 commits into from Feb 2, 2014
Merged

v0.10.0 #335

merged 19 commits into from Feb 2, 2014

Conversation

jharding
Copy link
Contributor

See milestone for details.

// list of files / patterns to load in the browser
files = [
'test/vendor/**/*',
'src/version.js',
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps src/**/* to avoid having to add/update/remove files more than once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The files from src/ need to be loaded in a certain order, so using a wildcard won't work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha

@jharding
Copy link
Contributor Author

If anyone is interested, you can view the README I'm working on for v0.10.0 here. Keep in mind that it's a living document so it'll change.

@marianocommisso
Copy link

Hi guys,

would you tell me when the v0.10.0 will be available? do you have a deadline for this?

Best Regards,
Mariano

@jharding
Copy link
Contributor Author

I was aiming for the end of July, but a more realistic time frame is probably early to mid-August. If you want to be notified when it's released, either watch this issue or follow @typeahead on Twitter.

@marianocommisso
Copy link

Fantastic. We'll be waiting for news on both channels.
Thanks!

@b-durand
Copy link

Hi,

What are the news on this next version? An idea of ​​the release date?

Thanks in advance.

@jdaily
Copy link

jdaily commented Oct 27, 2013

My headers are being rendered after the suggestions.
[Edit: fixed in pull request #482]
Code Below:

var codes = new Dataset({
    name: 'myCodes',
    valueKey: 'Code',
    prefetch: 'codes.json',

}).initialize();

$('.typeahead').typeahead({
    autoselect: true,
    sections: [{
        highlight: true,
        name: 'myCodesSection',
        source: codes,
        templates: {
            header: '<h5 class="typeahead-header">Codes</h5>'
        }
    },{
        name: 'google',
        minLength: 4,
        templates: {
            header: '<h5 class="typeahead-header">Google Results</h5>'
        },
        source: function (q, value) {
            geocoder.geocode({ address: q }, function (results, status) {

                value($.map(results, function (result) {
                    retval = [];
                    retval.push({
                        value: result.formatted_address });
                    return retval;
                }));
            });
        }
  }]
});

Also, if I add custom formatting for a suggestion I get a error:

Uncaught TypeError: Property 'suggestion' of object #<Object> is not a function typeahead.bundle.js:1112
getSuggestionNode typeahead.bundle.js:1112
x.extend.map jquery-1.10.2.js:782
getSuggestionsHtml typeahead.bundle.js:1104
render typeahead.bundle.js:1094
renderIfQueryIsSame typeahead.bundle.js:1142
get typeahead.bundle.js:559
x.isFunction.i jquery-1.10.2.js:827
update typeahead.bundle.js:1140
updateSection typeahead.bundle.js:1319
reverseArgs typeahead.bundle.js:35
x.extend.each jquery-1.10.2.js:657
_.each typeahead.bundle.js:33
update typeahead.bundle.js:1317
onQueryChanged typeahead.bundle.js:1448
flush typeahead.bundle.js:797
trigger typeahead.bundle.js:788
checkInputValue typeahead.bundle.js:973
onInput typeahead.bundle.js:934
x.isFunction.i jquery-1.10.2.js:827
x.event.dispatch jquery-1.10.2.js:5095
v.handle

Code with templates.suggestion:

var codes = new Dataset({
    name: 'myCodes',
    valueKey: 'Code',
    prefetch: 'codes.json',

}).initialize();

$('.typeahead').typeahead({
    autoselect: true,
    sections: [{
        highlight: true,
        name: 'myCodesSection',
        source: codes,
        templates: {
            header: '<h5 class="typeahead-header">Codes</h5>',
            suggestion: '<p><strong>{{Code}}</strong> – {{CodeDetail}}</p>'
        }
    },{
        name: 'google',
        minLength: 4,
        templates: {
            header: '<h5 class="typeahead-header">Google Results</h5>'
        },
        source: function (q, value) {
            geocoder.geocode({ address: q }, function (results, status) {

                value($.map(results, function (result) {
                    retval = [];
                    retval.push({
                        value: result.formatted_address });
                    return retval;
                }));
            });
        }
  }]
});

Other than that, everything is working great! Thanks

@jdaily
Copy link

jdaily commented Oct 27, 2013

Figured out the suggestion template issue (PICNIC error). The templates reference a function where the datum is passed in directly. My solution was to write a function to compile the html (hence, precompiled, should make that more clear if you can):

suggestion: function (context) {
                return "<p class='limit'><strong>" + context['value'] + "</strong> " + context['Code'] + "... </p>";
            }

@jharding
Copy link
Contributor Author

Apologies for my disappearance. I'm back though and am hoping to get v0.10 out some time in January.

@jharding
Copy link
Contributor Author

v0.10.0 is feature complete. If you want to play around with it, check out http://twitter.github.io/typeahead.js/beta/

@joshuajenkins
Copy link

Autoselect is great, but it doesn't highlight the item that hitting enter will submit. Not sure if that was an explicit design decision (doesn't seem to make much sense) but if is, I'd appreciate at least an option to enable it.

@jharding
Copy link
Contributor Author

jharding commented Feb 2, 2014

@joshuajenkins totally agree. Unfortunately that's how it's going to ship for v0.10.0, but I'm hoping to change that for v0.10.1.

@jharding
Copy link
Contributor Author

jharding commented Feb 2, 2014

BTW, it's looking like v0.10 should ship within the next 48 hours.

@jharding jharding merged commit f5eb7c0 into master Feb 2, 2014
@jharding jharding deleted the integration-0.10.0 branch February 2, 2014 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

6 participants