본문 바로가기
IT관련/REACT

nhn / tui.grid 선택한 rows id 값 가져오기

by 양평 대저택 2021. 1. 11.

- 패키지 설치법

npm install --save @toast-ui/react-grid

 

 

 

- rows id 가져오기

 

gridClick = (object) => {
for (var key in object) {
console.log("key: " + key + " / " + object[key])
}

위와 같이 해서 object key 값을 확인하고,

해당 키 값을 직접 오브젝트 어레이에 텍스트로 넣으면 값이 리턴된다.

오브젝트로 리턴되는 경우 한번더 키값을 잦아 바인딩 하면 값이 턴된다.

 

console.log("rowKey : " + object['rowKey'])
}

 

 

예시)

 

alert(object['rowKey'])

alert(this.state.rows[object['rowKey']])

alert(this.state.rows[object['rowKey']]['idwriting'] )

 

 



"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."

- 참조

github.com/nhn/tui.grid/issues/1254

 

선택한 row num 값을 불러오는 방법을 알고 싶습니다. · Issue #1254 · nhn/tui.grid

Version "@toast-ui/react-grid": { "version": "4.16.1", "resolved": "https://registry.npmjs.org/@toast-ui/react-grid/-/react-grid-4.16.1.tgz", "...

github.com

right-hot.tistory.com/entry/React-native-Object-object-%EC%B6%9C%EB%A0%A5-%EB%B0%8F-%EA%B0%92-%ED%99%95%EC%9D%B8

 

React native [Object object] 출력 및 값 확인

React native [Object object] 출력 및 값 확인 서버 통신 처리를 하다보면 프론트에서는 서버 값을 로그로 확인한다. 보통 JSON.stringify(object) 혹은 String(object) 형태로 값 확인이 가능하지만... Type 이..

right-hot.tistory.com