JavaScript

🤔 한개의 오브젝트에서 인자를 변경해서 여러개의 오브젝트로 만들려고 했다. gridItem = { headerName: translate('column_num', { value: 1 }), field: 'column1', cellRenderer: 'dateRenderer', width: 50, } 🧐 메서드 함수를 만들어서 처리해보자 Obejct.assign() 사용 함수를 만들어서 처리하니 복사가 쉬웠다 하지만 추가 목표가 생겼다. gridItems = (gridItem, name) => { const test = Object.assign({}, gridItem); test.headerName = name; test.field = name; console.log(name); console.log(..
🚪 ESLint 에러로 번역하자면 삼항 표현식을 중첩하지 마십시오. 관리자 혹은 본인만 삭제할 수 있는 버튼을 만드는 과정입니다. userId를 받아와서 'admin'이면 버튼을 생성하고 아니면 해당 게시물의 ID와 비교해서 일치하면 버튼을 생성한다. actions={ /* eslint-disable-next-line no-nested-ternary */ (userId === 'admin') ? this.buttonCreate(props) : (props.userID === userId) ? this.buttonCreate(props) : ''} buttonCreate = (props) => { return [ this.replyDelete(props)}> {translate('delete')}]; }..
🚪 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported for @RequestBody MultiValueMap 처음 시도를 했을때 Integer 값을 받는 Spring에서 이런 오류가 나왔다 해결책이 @RequestBody를 제거하는 것이라고 해서 시도해 보았다 하지만 다른 오류가 나왔다 ( 기존에는 이런 타입으로 여러개의 아이디를 삭제하는 형식은 가능했다. ) Map params 📌 Caused by: java.lang.IllegalArgumentException: The given id must not be null! FE에서 정확히 값을 넘겨주는데 제대로 못 받아 오는 경우가 발생했다. 🗝 Get integer ..
벨보이
'JavaScript' 태그의 글 목록