filter-button 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
## About
|
|
5
5
|
|
|
6
|
-

|
|
7
7
|
|
|
8
8
|
This package provides a custom field for Strapi that lets you add a filter button in no time.
|
|
9
9
|
|
|
@@ -11,9 +11,6 @@ Custom fields are supported since Strapi 4.4+ and offer powerful API to create h
|
|
|
11
11
|
|
|
12
12
|
This plugin lets you view filtered data according to your configurations.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
Installation
|
|
16
|
-
|
|
17
14
|
## Installation
|
|
18
15
|
|
|
19
16
|
To install this plugin, you need to add an NPM dependency to your Strapi application:
|
|
@@ -79,7 +76,7 @@ module.exports = (config, webpack) => {
|
|
|
79
76
|
|
|
80
77
|
```
|
|
81
78
|
|
|
82
|
-
|
|
79
|
+
#### Then run build:
|
|
83
80
|
#### For NPM:
|
|
84
81
|
```bash
|
|
85
82
|
npm run bild
|
|
@@ -18,7 +18,7 @@ const ButtonComponent = ({ name }) => {
|
|
|
18
18
|
|
|
19
19
|
const { uid } = allLayoutData.contentType;
|
|
20
20
|
const currentCollection = CONTENT_TYPES?.filter(data => { if (data?.from === uid && data?.attributeName === name) return data })[0]
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
const filterCards = () => {
|
|
23
23
|
history.push(`/content-manager/collectionType/${currentCollection?.to}?page=1&pageSize=10&sort=${currentCollection?.filterBy}:ASC&filters[$and][0][${currentCollection?.manyToMany ? currentCollection?.from?.split('.')[1] + 's' : currentCollection?.from?.split('.')[1]}][${currentCollection?.filterBy}][$eq]=${modifiedData?.title}`)
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "filter-button",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Custom filter button plugin for strapi",
|
|
5
6
|
"strapi": {
|
|
6
7
|
"name": "filter-button",
|
|
7
|
-
"description": "
|
|
8
|
+
"description": "Custom filter button plugin for strapi",
|
|
8
9
|
"kind": "plugin",
|
|
9
10
|
"displayName": "Filter Button"
|
|
10
11
|
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/kalpesh442266/Filter-Button"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"filter-button",
|
|
18
|
+
"strapi custom field",
|
|
19
|
+
"strapi filter button field"
|
|
20
|
+
],
|
|
11
21
|
"dependencies": {},
|
|
12
22
|
"author": {
|
|
13
23
|
"name": "A Strapi developer"
|
|
@@ -22,4 +32,4 @@
|
|
|
22
32
|
"npm": ">=6.0.0"
|
|
23
33
|
},
|
|
24
34
|
"license": "MIT"
|
|
25
|
-
}
|
|
35
|
+
}
|