Skip to content

Commit

Permalink
Merge pull request #73 from gewaer/add-resource-actions-slots
Browse files Browse the repository at this point in the history
  • Loading branch information
SparoHawk authored Feb 3, 2022
2 parents 0227711 + 490f402 commit a608273
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 36 deletions.
36 changes: 23 additions & 13 deletions dist/gw-browse.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gw-browse.common.js.map

Large diffs are not rendered by default.

36 changes: 23 additions & 13 deletions dist/gw-browse.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gw-browse.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gw-browse.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gw-browse.umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gewaer/gw-browse",
"version": "0.3.2",
"version": "0.3.3",
"description": "Base browse component for the Gewaer platform.",
"main": "./dist/gw-browse.umd.min.js",
"files": [
Expand Down
9 changes: 8 additions & 1 deletion src/browse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
@getData="getData"
@run-action="runAction"
@show-custom-filters-form="$modal.show('custom-filters-form')"
/>
>
<template #before-search-bar>
<slot name="before-search-bar" />
</template>
<template #after-search-bar>
<slot name="after-search-bar" />
</template>
</resource-actions>
</slot>

<div v-show="!loading">
Expand Down
9 changes: 6 additions & 3 deletions src/components/resource-actions.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="browse-actions row">
<slot name="before-search-bar" />
<div class="input-group search-bar col-12 col-md-7 col-lg-7">
<input
v-model="search.text"
Expand Down Expand Up @@ -42,7 +43,7 @@
</button>
</div>
</div>

<slot name="after-search-bar" />

<dropdown v-if="showBulkActions" :is-icon="false" class="bulk-actions col-auto ml-auto">
<button
Expand All @@ -66,9 +67,11 @@
</div>
</dropdown>

<div class="col-auto">
<div
v-if="showCreateResource"
class="col-auto"
>
<router-link
v-if="showCreateResource"
:to="createUrl"
class="add-record-btn btn btn-primary"
>
Expand Down

0 comments on commit a608273

Please sign in to comment.