fix: TableTree
This commit is contained in:
parent
bbc262a21d
commit
29048a7203
1 changed files with 3 additions and 2 deletions
|
|
@ -30,8 +30,9 @@ class TableTree {
|
|||
$keys = Functions::key_unique_values($name, $table);
|
||||
$data = [];
|
||||
foreach ($keys as $index) {
|
||||
list($rows, $table) = Functions::partition (Functions::lcurry(['\ctiso\Functions', '__index'], $index, $name), $table);
|
||||
// $rows = array_filter ($table, lcurry('__index', intval($index), $name));
|
||||
list($rows, $table) = Functions::partition(fn($row) => $row[$name] == $index, $table);
|
||||
// list($rows, $table) = Functions::partition (Functions::lcurry(['\ctiso\Functions', '__index'], $index, $name), $table);
|
||||
// $rows = array_filter ($table, lcurry('__index', intval($index), $name));
|
||||
//$rows = array_filter ($table, create_function ('$x', 'return __index ('.intval($index).', \''.$name.'\', $x);'));
|
||||
$data[$index] = call_user_func ($fn, $name, $index, $rows, self::walk ($level, $rows, $fn));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue