export default ( columns )=>{
    
    const expand = ( column,list )=>{
        if ( column.children && column.children.length > 0 ){
            for ( let child of column.children ){
                expand(child,list)
            }
        }else{
            list.push(column);
        }
    }   
    let list = [];
    for ( let column of  columns ){
        expand( column ,list );
    }
    return list;
}