Open KwonTaeyong opened 1 year ago
/**
Toast Grid Custom */ class CustomTextEditor { constructor(props) { var el = document.createElement('input');
el.type = 'text';
el.value = String(props.value ? props.value : "");
this.el = el;
el.onblur = function (e) {
}
}
getElement() { return this.el; }
getValue() { return this.el.value; }
mounted() { this.el.select(); }
}
저는 이런식으로 해결했습니다.
class CustomTextEditor { constructor(props) { const el = document.createElement('input'); const {maxLength} = props.columnInfo.editor.options;
el.type = 'text';
el.maxLength = maxLength;
el.value = String(props.value ? props.value: "");
this.el = el;
}
getElement() {
return this.el;
}
getValue() {
return this.el.value;
}
mounted() {
this.el.select();
}
}
답변주신거를 참고하여 해결하였습니다 감사합니다.
안녕하세요 여러번의 구글링 후 해결방안이 따로 찾아지지 않아 문의 드립니다. appendRow 사용하여 행 추가 후 edit 을 이용하여 새로운 값을 넣어줄 상황인데 기본 input 상태값이 null로 들어오는것을 확인하였습니다 null 이 예를들어 "" 빈값으로 설정이 따로 가능할까요???