adding .options.renderUnique...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-07-12 22:38:22 +03:00
parent 75548691d5
commit b77f678805

View File

@ -1181,6 +1181,10 @@ var BaseBrowserPrototype = {
// If true item keys must be unique... // If true item keys must be unique...
uniqueKeys: false, uniqueKeys: false,
// if true do not render an item more than once...
renderUnique: false,
// Controls how the disabled sub-tree root elements are skipped... // Controls how the disabled sub-tree root elements are skipped...
// //
// Can be: // Can be:
@ -3114,6 +3118,10 @@ var BaseBrowserPrototype = {
section[0] section[0]
: section : section
var seen = options.renderUnique ?
(context.seen = context.seen || new Set())
: false
// build range bounds... // build range bounds...
// use .get(..) on full (non-partial) range... // use .get(..) on full (non-partial) range...
var get_options = Object.assign( var get_options = Object.assign(
@ -3122,7 +3130,7 @@ var BaseBrowserPrototype = {
// .iterateNonIterable here it is not seen down the line... // .iterateNonIterable here it is not seen down the line...
{from: null, to: null, around: null, {from: null, to: null, around: null,
iterateNonIterable: options.iterateNonIterable}) iterateNonIterable: options.iterateNonIterable})
// index getter... // index getter...
var normIndex = function(i){ var normIndex = function(i){
return (i === undefined || typeof(i) == typeof(123)) ? return (i === undefined || typeof(i) == typeof(123)) ?