textarea는 엔터이고 ok시엔 이값이 엔터가 아니고 이어야 할듯한데…
여기 계신분들중에 해보신분 계신가요?
참 난감하네요…
에효… 이번 프로젝트에서 추천으로 이걸로 선택했는데…
어딜가도 이거에 대한 답변은 없고…
점점 후회가 되기 시작합니다.
답변 좀 부탁드리겠습니다
height: lineHeight - 4
};
jQuery.extend(true, eConfig, _editor.config);
eConfig.marginTop = (lineHeight - eConfig.height) / 2;
return '<div data-ax5grid-editor="checkbox" data-ax5grid-checked="' + checked + '" style="height:' + eConfig.height + 'px;width:' + eConfig.height + 'px;margin-top:' + eConfig.marginTop + 'px;"></div>';
}
};
const edit_textarea = {
useReturnToSave: false,
editMode: "popup",
_getHtml: function (_root, _columnKey, _editor, _value) {
// init 에서 사용하게 될 HTML 태그를 만들어 줍니다.
return `<div data-ax5grid-editor="textarea"></div>`;
},
_bindUI: function (_root, _columnKey, _$el, _editor, _$parent, _value) {
// 위치와 크기를 구합니다.
let offset = _$el.offset();
let box = {
width: _$el.width()
여기에 textarea 타입의 속성 useReturnToSave값이 false 로 되어 있구요.
},
keydown(key, columnKey, _options) {
let processor = {
"ESC"() {
for (var columnKey in this.inlineEditing) {
inlineEdit.deActive.call(this, "CANCEL", columnKey);
}
},
"RETURN"() {
if (this.isInlineEditing) {
if (this.inlineEditing[columnKey] && this.inlineEditing[columnKey].useReturnToSave) { // todo : 네이밍 검증 할 필요있음.
inlineEdit.deActive.call(this, "RETURN", columnKey);
} else {
return false;
}
} else {
for (var k in this.focusedColumn) {
let _column = this.focusedColumn[k],
column = this.bodyRowMap[_column.rowIndex + "_" + _column.colIndex],
dindex = _column.dindex,
여기에서 true이면 RETURN이 발동 하게 되어 있습니다.
제 환경에서는 TEXTAREA에서 에디터가 종료되지 않네요. 코드가 최신 버전인지 확인 해보셔야 할 것 같습니다.
https://github.com/ax5ui/ax5ui-kernel/tree/master/src/ax5ui-grid/test 여기에 테스트 코드들이 있으니 한번 체크해보세요.
답변감사합니다…
textarea 입력 다이얼로그는 잘 뜨는데…
정작 입력된 값은 그리드에서는 한 줄로만 나오네요…
multiLine:true로 바꿔보고 밑에 얘기해주신 아래에서 확인해봤는데…
방금 해결했다고 하네요… formatter에 span을 만들고 style에 pre을 추가하니까 줄바꿈되어나오네요…
그리고 또 궁금한게있는데요…
그리드 가변 높이를 적용해야하는데요…
어떻게 해야할까요?;;; 지원은 하지 않는다고했는데…
꼭 필요한 상황이라… 그렇다고 다른 그리드로 가기에는 좀 늦은 상황이라…
수정을 해야한다면 어느부분을 어떻게 해야하나요?;;;;
매번 번거롭게해드려 죄송합니다.
https://github.com/ax5ui/ax5ui-kernel/tree/master/src/ax5ui-grid/test