본문 바로가기
반응형

리액트어드민5

react-admin error: Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input eleme.. Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. Select의 value에 undefined가 들어가서 처리할 수 없다는 에러가 떴다 왜 이런 에러가 떴나 하고 보니.. Select에 value를 지정해주지 않았음... ... Select에 value를 넣어주고 useSta.. 2022. 5. 6.
react-admin error: React does not recognize the 'basePath' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'basepath' instead. If you accidentally passed it from a parent component, r.. Warning: React does not recognize the 'basePath' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'basepath' instead. If you accidentally passed it from a parent component, remove it from the DOM element. 위와 같은 에러가 났다... 왜 이런 에러가 났는가 상황을 본다면 Table을 만들고 나서 에러가 생김 제목 내용 밤편지 이 밤 그날의 반딧불을 당신의 창 가까이 보낼게요 사랑한다는 말이에요 저 에러가 무슨 에러인지 찾아보.. 2022. 4. 28.
React-Admin 리스트에 검색 및 필터 추가하기 Post List에 검색 및 필터를 추가해보겠다 먼저 PostFilter 컴포넌트를 추가한다 그리고 PostList 컴포넌트의 List에 filters 속성을 추가해준다 // in src/posts.tsx const PostFilter = (props) => { return ( ) } export const PostList = (props) => { return ( // ... ) } PostFilter 컴포넌트에서 의 source="q"는 JSONPlaceholder가 제공하는 전체 텍스트 활용을 말한다 alwaysOn는 항상 화면에 나타나도록 설정하는 속성이다 그리고 PostList 컴포넌트의 List에 filters를 추가하면 ADD FILTER 버튼이 생성된다 ADD FILTER 버튼을 클릭하면 .. 2020. 4. 23.
React-Admin 리스트에 생성 및 수정 추가하기 지난 글에서 언급했듯 이번에는 리스트에 생성 및 추가 기능을 붙여 보려한다 그전에 지난 글이 궁금하다면 아래 링크 클릭~ React-Admin 시작하기 - API 앤드포인트를 맵핑하여 List로 보여주기 React-Admin 튜토리얼을 보고 따라해봤다 먼저 앞전에 쓴 포스팅 Create React App을 이용하여 React 앱, TypeScript 시작하기를 통해 React 앱을 만든 후 react-admin 패키지를 설치한다 yarn create react-app t.. hyung1.tistory.com 먼저 App.tsx 파일에서 import한 react-admin에 EditGuesser를 추가한 후 에 edit={EditGuesser} 를 추가한다 그러면 아래 화면처럼 리스트 열마다 EDIT 버튼.. 2020. 4. 22.
React-Admin 시작하기 - API 앤드포인트를 맵핑하여 List로 보여주기 React-Admin 튜토리얼을 보고 따라해봤다 먼저 앞전에 쓴 포스팅 Create React App을 이용하여 React 앱, TypeScript 시작하기를 통해 React 앱을 만든 후 react-admin 패키지를 설치한다 yarn create react-app test-admin cd test-admin/ yarn add react-admin ra-data-json-server prop-types yarn start http://localhost:3000/ 에는 아래 화면처럼 나올 것이다 React-admin를 사용하기 위해서는 생성, 검색, 업데이트 및 삭제 (CRUD) 할 수 있어야 한다 그래서 JSONPlaceholder에서 예시용으로 제공해주는 샘플 더미 API를 이용해 연습해 볼 것이다 .. 2020. 4. 21.
반응형