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