src/Component/InlineEdit.php
public function renderView()
    {
        parent::renderView();

        $type = ($this->model && $this->field) ? $this->model->elements[$this->field]->type : 'text';
        $type = ($type === 'string') ? 'text' : $type;

        if ($type != 'text' && $type != 'number') {
            throw new Exception('Error: Only string or number field can be edited inline. Field Type = '.$type);
        }

        if ($this->model && $this->model->loaded()) {
            $initValue = $this->model->get($this->field);
        } else {
            $initValue = $this->initValue;
        }

        $fieldName = $this->field ? $this->field : 'name';

        $this->template->set('inputCss', $this->inputCss);
        $this->template->trySet('fieldName', $fieldName);
        $this->template->trySet('fieldType', $type);

        $this->vue('atk-inline-edit', [
            'initValue'     => $initValue,
            'url'           => $this->cb->getJSURL(),
            'saveOnBlur'    => $this->saveOnBlur,
        ]);

//        $this->js(true, (new jsVueService())->createAtkVue(
//            '#'.$this->name,
//            'atk-inline-edit',
//            [
//                'initValue'     => $initValue,
//                'url'           => $this->cb->getJSURL(),
//                'saveOnBlur'    => $this->saveOnBlur,
//            ]
//        ));
    }
public function renderView()
    {
        parent::renderView();

        $type = ($this->model && $this->field) ? $this->model->elements[$this->field]->type : 'text';
        $type = ($type === 'string') ? 'text' : $type;

        if ($type != 'text' && $type != 'number') {
            throw new Exception('Error: Only string or number field can be edited inline. Field Type = '.$type);
        }

        if ($this->model && $this->model->loaded()) {
            $initValue = $this->model->get($this->field);
        } else {
            $initValue = $this->initValue;
        }

        $fieldName = $this->field ? $this->field : 'name';

        $this->template->set('inputCss', $this->inputCss);
        $this->template->trySet('fieldName', $fieldName);
        $this->template->trySet('fieldType', $type);

        $this->vue('atk-inline-edit', [
            'initValue'     => $initValue,
            'url'           => $this->cb->getJSURL(),
            'saveOnBlur'    => $this->saveOnBlur,
        ]);

//        $this->js(true, (new jsVueService())->createAtkVue(
//            '#'.$this->name,
//            'atk-inline-edit',
//            [
//                'initValue'     => $initValue,
//                'url'           => $this->cb->getJSURL(),
//                'saveOnBlur'    => $this->saveOnBlur,
//            ]
//        ));
    }
public function renderView ( ) { parent :: renderView ( ) ; $ type = ( $ this -> model && $ this -> field ) ? $ this -> model -> elements [ $ this -> field ] -> type : 'text' ; $ type = ( $ type === 'string' ) ? 'text' : $ type ; if ( $ type != 'text' && $ type != 'number' ) { throw new Exception ( 'Error: Only string or number field can be edited inline. Field Type = ' . $ type ) ; } if ( $ this -> model && $ this -> model -> loaded ( ) ) { $ initValue = $ this -> model -> get ( $ this -> field ) ; } else { $ initValue = $ this -> initValue ; } $ fieldName = $ this -> field ? $ this -> field : 'name' ; $ this -> template -> set ( 'inputCss' , $ this -> inputCss ) ; $ this -> template -> trySet ( 'fieldName' , $ fieldName ) ; $ this -> template -> trySet ( 'fieldType' , $ type ) ; $ this -> vue ( 'atk-inline-edit' , [ 'initValue' => $ initValue , 'url' => $ this -> cb -> getJSURL ( ) , 'saveOnBlur' => $ this -> saveOnBlur , ] ) ; //        $this->js(true, (new jsVueService())->createAtkVue( //            '#'.$this->name, //            'atk-inline-edit', //            [ //                'initValue'     => $initValue, //                'url'           => $this->cb->getJSURL(), //                'saveOnBlur'    => $this->saveOnBlur, //            ] //        )); }
Renders View.
Renders View .