Bug in API/fnUpdate documentation
Bug in API/fnUpdate documentation
mot
Posts: 5Questions: 0Answers: 0
Docs at http://datatables.net/api (and in the source code) say that '# bool (optional) : Redraw the table after inserting the table (optional - default true)'.
But default is false because source code (version 1.6.2) is (line #1686)
[code]if ( typeof bRedraw != 'undefined' && bRedraw )[/code]
But default is false because source code (version 1.6.2) is (line #1686)
[code]if ( typeof bRedraw != 'undefined' && bRedraw )[/code]
This discussion has been closed.
Replies
Very good catch - that you for letting me know about that! The bug is in the code - fnUpdate certainly should redraw the table... The '&&' should really be an '||'...
This will be corrected in the next release of DataTables.
Regards,
Allan
Then I think code should be like this:
[code]if ( typeof bRedraw == 'undefined' || bRedraw )[/code]
or even better
[code]if (bRedraw !== false)[/code]
So it will not redraw the table only if bRedraw is false.
Thanks for the pick up on that!
Regards,
Allan
I mean if bDraw is false, the table is not redrawn.
If bDraw is true, the table is redrawn.
What does redraw mean in this case?
if I do fnUpdate(....,,..., false)
does that mean my changes will not be reflected?
thanks
The redraw will have DataTables update itself for the new data - so it would be displayed in the table (if appropriate), sorting, and filtering would act on it (if needed) etc. You would want to not redraw if you have a lot of updates to make, and then only redraw once.
Allan
Allan
When you say "it can be used for searching" what do you mean?
Has it got anything to do with filtering or sorting data?
I am sorry but im a bit confused about it.
thanks ;)
Regards,
Allan