react and rails search
added code in the services
+ if (stu){
+ return fetch(`${BASE_URL}students?search=${JSON.stringify(stu)}`, requestOptions).then(handleResponse);
+ }
+ else{
+ return fetch(`${BASE_URL}students`, requestOptions).then(handleResponse);
+ }
-function getAll() { replace it with stu
+function getAll(stu) {
shikha check after debugger first that in which data is getting...
Comments
Post a Comment