Filtering articles

4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€44.05
List Price:  €61.68
You save:  €17.62
£37.58
List Price:  £52.62
You save:  £15.03
CA$69.44
List Price:  CA$97.22
You save:  CA$27.78
A$78.41
List Price:  A$109.78
You save:  A$31.37
S$65.75
List Price:  S$92.05
You save:  S$26.30
HK$387.76
List Price:  HK$542.90
You save:  HK$155.13
CHF 41.54
List Price:  CHF 58.16
You save:  CHF 16.61
NOK kr522.97
List Price:  NOK kr732.21
You save:  NOK kr209.23
DKK kr328.90
List Price:  DKK kr460.49
You save:  DKK kr131.58
NZ$83.99
List Price:  NZ$117.60
You save:  NZ$33.60
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.46
৳6,091.40
List Price:  ৳8,528.46
You save:  ৳2,437.05
₹4,271.75
List Price:  ₹5,980.80
You save:  ₹1,709.04
RM218.65
List Price:  RM306.13
You save:  RM87.48
₦80,730.85
List Price:  ₦113,029.65
You save:  ₦32,298.80
₨14,091.30
List Price:  ₨19,728.96
You save:  ₨5,637.65
฿1,677.91
List Price:  ฿2,349.21
You save:  ฿671.30
₺1,920.75
List Price:  ₺2,689.20
You save:  ₺768.45
B$284.04
List Price:  B$397.68
You save:  B$113.64
R945.21
List Price:  R1,323.38
You save:  R378.16
Лв86.13
List Price:  Лв120.59
You save:  Лв34.45
₩71,921.98
List Price:  ₩100,696.53
You save:  ₩28,774.54
₪180.85
List Price:  ₪253.20
You save:  ₪72.35
₱2,814.26
List Price:  ₱3,940.19
You save:  ₱1,125.93
¥7,179.56
List Price:  ¥10,051.96
You save:  ¥2,872.40
MX$983.64
List Price:  MX$1,377.18
You save:  MX$393.53
QR182.75
List Price:  QR255.87
You save:  QR73.11
P686.29
List Price:  P960.87
You save:  P274.57
KSh6,463.70
List Price:  KSh9,049.70
You save:  KSh2,586
E£2,547.49
List Price:  E£3,566.69
You save:  E£1,019.20
ብር6,681.17
List Price:  ብር9,354.18
You save:  ብር2,673
Kz45,590.88
List Price:  Kz63,830.88
You save:  Kz18,240
CLP$46,812.37
List Price:  CLP$65,541.06
You save:  CLP$18,728.69
CN¥364.27
List Price:  CN¥510.01
You save:  CN¥145.74
RD$2,975.10
List Price:  RD$4,165.38
You save:  RD$1,190.28
DA6,619.03
List Price:  DA9,267.17
You save:  DA2,648.14
FJ$112.99
List Price:  FJ$158.20
You save:  FJ$45.20
Q386.10
List Price:  Q540.58
You save:  Q154.47
GY$10,489.05
List Price:  GY$14,685.51
You save:  GY$4,196.46
ISK kr6,375.22
List Price:  ISK kr8,925.82
You save:  ISK kr2,550.60
DH464.99
List Price:  DH651.02
You save:  DH186.03
L862.86
List Price:  L1,208.08
You save:  L345.21
ден2,708.74
List Price:  ден3,792.46
You save:  ден1,083.71
MOP$400.53
List Price:  MOP$560.77
You save:  MOP$160.24
N$935.59
List Price:  N$1,309.90
You save:  N$374.31
C$1,838.46
List Price:  C$2,573.99
You save:  C$735.53
रु6,841.02
List Price:  रु9,577.98
You save:  रु2,736.95
S/185.02
List Price:  S/259.04
You save:  S/74.02
K207.50
List Price:  K290.52
You save:  K83.01
SAR187.51
List Price:  SAR262.53
You save:  SAR75.02
ZK1,410.01
List Price:  ZK1,974.13
You save:  ZK564.11
L219.29
List Price:  L307.02
You save:  L87.73
Kč1,100.07
List Price:  Kč1,540.19
You save:  Kč440.12
Ft17,940.87
List Price:  Ft25,118.65
You save:  Ft7,177.78
SEK kr485.01
List Price:  SEK kr679.06
You save:  SEK kr194.04
ARS$58,712.48
List Price:  ARS$82,202.17
You save:  ARS$23,489.69
Bs346.41
List Price:  Bs485.01
You save:  Bs138.59
COP$215,920.08
List Price:  COP$302,305.39
You save:  COP$86,385.31
₡25,270.56
List Price:  ₡35,380.81
You save:  ₡10,110.24
L1,299.69
List Price:  L1,819.68
You save:  L519.98
₲401,259.06
List Price:  ₲561,794.79
You save:  ₲160,535.73
$U2,086.69
List Price:  $U2,921.54
You save:  $U834.84
zł188.24
List Price:  zł263.56
You save:  zł75.31
Already have an account? Log In

Transcript

Okay so we are going to see how we can use a POST request to filter only for type. So, for example, let's add filter type property in the state this will contain the type that we are filtering. So let's do like this. So for example in the current subtitle tag, so these one shoes when we click on this, we are going to filter for that specific type. So our type filter and this will have Param that is the type to filter. We can set the state and seeing that First IPS now sorry is Skype and we can perform our research.

So search article, of course, this will be type type, we see reference to these in the debt constant. Okay, this seems fine. So what we're going to do is in our subtitle tag we are going to create our unknown click property that we've called the type filter with article dot type. Now, this will probably work but for before having a look at the result. Let's see Just let's add some info in order to be sure that everything is working fine so let's use these components that is simply a row with some borders and some padding. So what we're going to do is okay show going all the time and hear the other side and of course we need a button that that will remove the will remove the filter but the we have to show these on the filter side is the friend from now.

Okay, this seems fine. So Let's see if everything is working correctly. So we click on choose, we see all issues okay. So, now, when we click on the X, we would like to remove these this filter, so, remove type filter and we simply set filter stock to now, but we have to load all the articles. So, we can put articles we can simply export this this function because we are going to use it in different places, so, component did mount we will just call this load of articles and even here we are going to load again all the articles. So we have to we have to bind these here and when we have okay button, so on click it will be this dot remove type filter.

Let's see if it works. So we we go here we click on shoes and we remove it we click on T shirt, here it is and we remove it. It works fine

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.