You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -158,9 +158,9 @@ Next goes `group filter` component:
158
158
159
159
If we click on one of the filters, we'll see that it modifies `is_public` URL's parameter to respective value. Our component will track these changes and send server requests to get filtered data. We will return to this topic when we'll create additional filters ourselves.
160
160
161
-
After filters, we can see one more very powerful component - context menu, which in this case, controls ordering our leads by their names.
161
+
After filters, we can see one more very useful component - context menu, which in this case, controls ordering our leads by their names.
Next, we see the usage of one of our most powerful component - Table Builder, which powers `@table` blade component for easy interactive tables set up:
As you can see, we added a new `tb-column` tag. `Name` parameter is a key in the data object, which is just our `status` column name. And we're passing new language string to a label property, as we discussed earlier.
256
+
257
+
Now if we refresh lead's page, we'll see their statuses:
Normally we'd have to implement some filtering logic, but thanks to `awes-io/repository` package, all we need to do is to add `status` parameter to `searchable` property in `App\Sections\Leads\Repositories\LeadRepository`:
269
+
270
+
```php
271
+
protected $searchable = ['status'];
272
+
```
273
+
274
+
and add `status` to `@table`'s `scope_api_params` property (this will allow the component to track any changes in parameter value and handle them respectively):
now if we click on filter option, request with `status` parameter will be sent to the server and `repository` package will filter data and return it for `table-builder` to render:
0 commit comments