lib
This commit is contained in:
parent
b32a8f4852
commit
a8c9a139d6
|
@ -1475,6 +1475,7 @@ var BDFDB = {
|
|||
config.name = config.name && [config.name].flat().filter(n => n);
|
||||
config.key = config.key && [config.key].flat().filter(n => n);
|
||||
config.props = config.props && [config.props].flat().filter(n => n);
|
||||
config.filter = typeof config.filter == "function" && config.filter;
|
||||
var parent = firstarray = instance;
|
||||
while (!BDFDB.ArrayUtils.is(firstarray) && firstarray.props && firstarray.props.children) firstarray = firstarray.props.children;
|
||||
if (!BDFDB.ArrayUtils.is(firstarray)) {
|
||||
|
@ -1524,7 +1525,7 @@ var BDFDB = {
|
|||
function check (instance) {
|
||||
if (!instance) return false;
|
||||
let props = instance.stateNode ? instance.stateNode.props : instance.props;
|
||||
return instance.type && config.name && config.name.some(name => ((instance.type.displayName || instance.type.name) === name)) || config.key && config.key.some(key => instance.key == key) || props && config.props && config.props.every(prop => BDFDB.ArrayUtils.is(prop) ? (BDFDB.ArrayUtils.is(prop[1]) ? prop[1].some(checkvalue => propCheck(props, prop[0], checkvalue)) : propCheck(props, prop[0], prop[1])) : props[prop] !== undefined);
|
||||
return instance.type && config.name && config.name.some(name => ((instance.type.displayName || instance.type.name) === name)) || config.key && config.key.some(key => instance.key == key) || props && config.props && config.props.every(prop => BDFDB.ArrayUtils.is(prop) ? (BDFDB.ArrayUtils.is(prop[1]) ? prop[1].some(checkvalue => propCheck(props, prop[0], checkvalue)) : propCheck(props, prop[0], prop[1])) : props[prop] !== undefined) || config.filter && config.filter(instance);
|
||||
}
|
||||
function propCheck (props, key, value) {
|
||||
return key != null && props[key] != null && value != null && (key == "className" ? (" " + props[key] + " ").indexOf(" " + value + " ") > -1 : BDFDB.equals(props[key], value));
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue