{"version":"1.0","provider_name":"Tong Hin&#039;s Blog","provider_url":"https:\/\/www.tonghin.com.my\/blog","author_name":"Mohammedi Khalil","author_url":"https:\/\/www.tonghin.com.my\/blog\/author\/khalil\/","title":"Check Box For React Native | Tong Hin&#039;s Blog","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"tRbAXAtqKm\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2022\/08\/08\/check-box-react-native\/\">Check Box For React Native<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/www.tonghin.com.my\/blog\/2022\/08\/08\/check-box-react-native\/embed\/#?secret=tRbAXAtqKm\" width=\"600\" height=\"338\" title=\"&#8220;Check Box For React Native&#8221; &#8212; Tong Hin&#039;s Blog\" data-secret=\"tRbAXAtqKm\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script>\n\/*! This file is auto-generated *\/\n!function(c,d){\"use strict\";var e=!1,o=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},c.wp.receiveEmbedMessage);else if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(!t);else if(!(t.secret||t.message||t.value));else if(\/[^a-zA-Z0-9]\/.test(t.secret));else{for(var r,s,a,i=d.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),n=d.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),o=new RegExp(\"^https?:$\",\"i\"),l=0;l<n.length;l++)n[l].style.display=\"none\";for(l=0;l<i.length;l++)if(r=i[l],e.source!==r.contentWindow);else{if(r.removeAttribute(\"style\"),\"height\"===t.message){if(1e3<(s=parseInt(t.value,10)))s=1e3;else if(~~s<200)s=200;r.height=s}if(\"link\"===t.message)if(s=d.createElement(\"a\"),a=d.createElement(\"a\"),s.href=r.getAttribute(\"src\"),a.href=t.value,!o.test(a.protocol));else if(a.host===s.host)if(d.activeElement===r)c.top.location.href=t.value}}},e)c.addEventListener(\"message\",c.wp.receiveEmbedMessage,!1),d.addEventListener(\"DOMContentLoaded\",t,!1),c.addEventListener(\"load\",t,!1);function t(){if(o);else{o=!0;for(var e,t,r,s=-1!==navigator.appVersion.indexOf(\"MSIE 10\"),a=!!navigator.userAgent.match(\/Trident.*rv:11\\.\/),i=d.querySelectorAll(\"iframe.wp-embedded-content\"),n=0;n<i.length;n++){if(!(r=(t=i[n]).getAttribute(\"data-secret\")))r=Math.random().toString(36).substr(2,10),t.src+=\"#?secret=\"+r,t.setAttribute(\"data-secret\",r);if(s||a)(e=t.cloneNode(!0)).removeAttribute(\"security\"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:\"ready\",secret:r},\"*\")}}}}(window,document);\n<\/script>\n","description":"I had made a new screen the week before. The user must choose the warehouse that he is currently in on the new screen, which appeared right after logging in. So\u00a0I\u00a0created\u00a0a\u00a0checkbox\u00a0for\u00a0react\u00a0native\u00a0paper\u00a0where\u00a0the\u00a0status\u00a0should\u00a0have\u00a0been\u00a0checked\u00a0or\u00a0unchecked\u00a0on\u00a0that\u00a0screen.\u00a0So,\u00a0when\u00a0I\u00a0had\u00a0located\u00a0the\u00a0warehouse&#8217;s\u00a0data,\u00a0I\u00a0mapped\u00a0a\u00a0new\u00a0feature\u00a0to\u00a0it\u00a0called\u00a0isChecked\u00a0with type Boolean and\u00a0set\u00a0it\u00a0to\u00a0false. Next,\u00a0I\u00a0created\u00a0a\u00a0function\u00a0called\u00a0handle\u00a0function\u00a0that\u00a0accepts\u00a0an\u00a0id\u00a0parameter\u00a0and\u00a0has\u00a0a\u00a0condition\u00a0that,\u00a0if\u00a0true,\u00a0changes\u00a0the\u00a0value\u00a0of\u00a0isChecked\u00a0to\u00a0the\u00a0opposite\u00a0value.\u00a0Thus,\u00a0alter\u00a0it\u00a0from\u00a0true\u00a0to\u00a0false\u00a0if\u00a0it\u00a0was\u00a0true,\u00a0and\u00a0vice\u00a0versa\u00a0if\u00a0it\u00a0was\u00a0false. When&nbsp;I&nbsp;no&nbsp;longer&nbsp;needed&nbsp;to&nbsp;use&nbsp;that&nbsp;screen,&nbsp;I&nbsp;didn&#8217;t&nbsp;want&nbsp;to&nbsp;keep&nbsp;it&nbsp;on&nbsp;the&nbsp;navigator&nbsp;and&nbsp;be&nbsp;able&nbsp;to&nbsp;find&nbsp;it&nbsp;by&nbsp;pressing&nbsp;the&nbsp;back&nbsp;button,&nbsp;so&nbsp;I&nbsp;destroyed&nbsp;the&nbsp;screen.&nbsp;They&nbsp;will&nbsp;only&nbsp;be&nbsp;able&nbsp;to&nbsp;call&nbsp;again&nbsp;through&nbsp;the&nbsp;button&nbsp;to&nbsp;change,&nbsp;and&nbsp;then&nbsp;I&nbsp;destroyed&nbsp;it&nbsp;once&nbsp;more.&nbsp;I&nbsp;made&nbsp;all&nbsp;of&nbsp;that&nbsp;in&nbsp;order&nbsp;to&nbsp;use&nbsp;multi-selection;&nbsp;if&nbsp;it&nbsp;were&nbsp;single&nbsp;selection&nbsp;only,&nbsp;it&nbsp;wouldn&#8217;t&nbsp;be&nbsp;as&nbsp;complicated. I\u00a0also\u00a0work\u00a0on\u00a0the\u00a0docker\u00a0registry,\u00a0but\u00a0I\u00a0was\u00a0unable\u00a0to\u00a0complete\u00a0the\u00a0assignment\u00a0that\u00a0Mr.\u00a0Peter\u00a0assigned\u00a0me\u00a0because\u00a0I\u00a0was\u00a0still\u00a0struggling\u00a0with\u00a0the\u00a0SSL.\u00a0I\u00a0also\u00a0generated\u00a0a\u00a0SalesApi\u00a0using\u00a0a\u00a0different\u00a0generator,\u00a0but\u00a0I\u00a0was\u00a0unable\u00a0 to\u00a0utilise\u00a0it.\u00a0I\u00a0am\u00a0still\u00a0searching\u00a0for\u00a0examples\u00a0of\u00a0how\u00a0to\u00a0use\u00a0that\u00a0to\u00a0resolve \u00a0the\u00a0problem\u00a0with\u00a0the\u00a0format\u00a0of\u00a0the\u00a0array\u00a0when\u00a0submitting\u00a0the\u00a0warehouses."}