rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

Feature request / idea: Use "javascript enums" for options instead of strings #105

Closed JoepGeevers closed 10 years ago

JoepGeevers commented 10 years ago

Hi,

Just an idea:

Instead of using strings for options, personally I would prefer javascript objects with properties and values, so I wouldn't have to memorize the string options, but have intellisense take care of that.

For instance:

var rateLimitMethods = { notifyAtFixedRate: "notifyAtFixedRate", notifyWhenChangesStop: "notifyWhenChangesStop" }

Would allow for:

someObservableOrComputed.extend({ rateLimit: { timeout: 500, method: rateLimitMethods.notifyWhenChangesStop } });

rniemeyer commented 10 years ago

looks like this one might be better for Knockout itself. closing.