src/Table/Renderer/Bootstrap.php
public function remote_select(Column\RemoteSelect $column, array $row)
    {

        // OPTIONS
        $options = html('option', [], '--');
        $elementValue = $row[$column->getIndex()];
        foreach($column->getOptions() as $value => $key){
            $attr = ['value' => $value];
            if ($value == $elementValue){
                $attr['selected'] = 'selected';
            }
            $options .= html('option', $attr, $key);
        }

        $html = html('select', [
            'class' => 'ff-remote-select',
            'data-id' => $row[$column->getTable()->getIdField()],
            'data-column' =>  $column->getName()
        ], $options);
        return $html;
    }
public function remote_select(Column\RemoteSelect $column, array $row)
    {

        // OPTIONS
        $options = html('option', [], '--');
        $elementValue = $row[$column->getIndex()];
        foreach($column->getOptions() as $value => $key){
            $attr = ['value' => $value];
            if ($value == $elementValue){
                $attr['selected'] = 'selected';
            }
            $options .= html('option', $attr, $key);
        }

        $html = html('select', [
            'class' => 'ff-remote-select',
            'data-id' => $row[$column->getTable()->getIdField()],
            'data-column' =>  $column->getName()
        ], $options);
        return $html;
    }
public function remote_select ( Column \ RemoteSelect $ column , array $ row ) { // OPTIONS $ options = html ( 'option' , [ ] , '--' ) ; $ elementValue = $ row [ $ column -> getIndex ( ) ] ; foreach ( $ column -> getOptions ( ) as $ value => $ key ) { $ attr = [ 'value' => $ value ] ; if ( $ value == $ elementValue ) { $ attr [ 'selected' ] = 'selected' ; } $ options .= html ( 'option' , $ attr , $ key ) ; } $ html = html ( 'select' , [ 'class' => 'ff-remote-select' , 'data-id' => $ row [ $ column -> getTable ( ) -> getIdField ( ) ] , 'data-column' => $ column -> getName ( ) ] , $ options ) ; return $ html ; }
Render remote Select

@param \FrenchFrogs\Table\Column\RemoteSelect $column
@param array $row
@return string
Render remote Select