Closed tolmalev closed 11 years ago
Seems, that it was removed in this commit:
https://github.com/vitalets/x-editable/commit/8ed61d6b6b7d05f9ca8e325b3a8d04ad0a106643
yes, it was replaced with display
option that is more flexible. Now you can write:
editable({
....
display: function(value, sourceData) {
var limit = 5;
if(value.length > limit) {
$(this).html('checked '+value.length+ ' of '+sourceData.length);
}
}
});
May be you will make a default display function for checklist with such behaviour?
in first version it caused additional options that looked for me as overload (limit
, limitText
.. ).
But now I have an idea that display
can be defined as string and serve as template ("checked X of Y").
btw, do you need limit
option or you just need always show check-summary?
I don't know javascript. May be it is possible to do smth like this?
function defaultDiplay(limit) {
return function(value, sourceData) {
...
}
}
$("#name").editable({
display: defaultDisplay(3)
})
Limit isn't necessary, but can be very useful.
agree. limit seems usefull and I think to revert it in standard func. It's always ballance between convinience and number of options ) thx!
Is it still possible not to display all selected values from checklist?
Like: "Selected 3 of 7"
It has been default behaviour yet, but doesn't work now.