homeflowjs 0.7.5 → 0.7.6
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/package.json
CHANGED
|
@@ -18,7 +18,9 @@ const PropertiesList = ({ properties, ListItem, infiniteScroll }) => {
|
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const propertiesToRender = properties || [];
|
|
22
|
+
|
|
23
|
+
const items = propertiesByPage(propertiesToRender).map((page) => (
|
|
22
24
|
<div
|
|
23
25
|
data-result-page={page[0].resultPage}
|
|
24
26
|
key={uniqueKey()}
|
|
@@ -38,11 +40,15 @@ const PropertiesList = ({ properties, ListItem, infiniteScroll }) => {
|
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
PropertiesList.propTypes = {
|
|
41
|
-
properties: PropTypes.array
|
|
43
|
+
properties: PropTypes.array,
|
|
42
44
|
ListItem: PropTypes.elementType.isRequired,
|
|
43
45
|
infiniteScroll: PropTypes.bool.isRequired,
|
|
44
46
|
};
|
|
45
47
|
|
|
48
|
+
PropertiesList.defaultProps = {
|
|
49
|
+
properties: [],
|
|
50
|
+
};
|
|
51
|
+
|
|
46
52
|
const mapStateToProps = state => ({
|
|
47
53
|
properties: state.properties.properties,
|
|
48
54
|
});
|
|
@@ -14,6 +14,7 @@ class SearchForm extends Component {
|
|
|
14
14
|
const {
|
|
15
15
|
defaultSort,
|
|
16
16
|
defaultChannel,
|
|
17
|
+
defaultStatus,
|
|
17
18
|
search,
|
|
18
19
|
setSearch,
|
|
19
20
|
setInitialSearch,
|
|
@@ -27,10 +28,14 @@ class SearchForm extends Component {
|
|
|
27
28
|
if (defaultSort && !searchFromFragment.sorted) {
|
|
28
29
|
searchFromFragment.sorted = defaultSort;
|
|
29
30
|
}
|
|
31
|
+
if (defaultStatus && !searchFromFragment.status) {
|
|
32
|
+
searchFromFragment.status = defaultStatus;
|
|
33
|
+
}
|
|
30
34
|
setInitialSearch(searchFromFragment);
|
|
31
35
|
setSearch(searchFromFragment);
|
|
32
36
|
} else {
|
|
33
37
|
if (defaultSort && !search.sorted) setSearchField({ sorted: defaultSort });
|
|
38
|
+
if (defaultStatus && !search.status) setSearchField({ status: defaultStatus });
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
const place = Homeflow.get('place');
|
|
@@ -62,6 +67,7 @@ class SearchForm extends Component {
|
|
|
62
67
|
const {
|
|
63
68
|
defaultSort,
|
|
64
69
|
defaultChannel,
|
|
70
|
+
defaultStatus,
|
|
65
71
|
search,
|
|
66
72
|
setSearch,
|
|
67
73
|
setSearchField,
|
|
@@ -96,6 +102,7 @@ SearchForm.propTypes = {
|
|
|
96
102
|
|
|
97
103
|
const mapStateToProps = state => ({
|
|
98
104
|
search: state.search.currentSearch,
|
|
105
|
+
defaultStatus: state.app.themePreferences.default_search_status,
|
|
99
106
|
});
|
|
100
107
|
|
|
101
108
|
const mapDispatchToProps = {
|