homeflowjs 1.0.0 → 1.0.1
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
@@ -34,8 +34,22 @@ class SearchForm extends Component {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
if (defaultChannel) setSearchField({ channel: defaultChannel });
|
37
|
-
|
38
|
-
|
37
|
+
/**
|
38
|
+
* If a custom redirect has been set we need to make sure a channel
|
39
|
+
* is set in initial search search state. This is because the load more
|
40
|
+
* button loads more property results based on the initial search not
|
41
|
+
* the current search. If no channel is set it will try to load more
|
42
|
+
* properties based off the custom redirect but with no channel
|
43
|
+
* leading to no properties being found.
|
44
|
+
*/
|
45
|
+
if (customsalesredirect) {
|
46
|
+
setSearchField({ customSalesRedirect: customsalesredirect })
|
47
|
+
setInitialSearch({ ...search, channel: defaultChannel ? defaultChannel : 'sales' });
|
48
|
+
}
|
49
|
+
if (customlettingsredirect) {
|
50
|
+
setSearchField({ customLettingsRedirect: customlettingsredirect })
|
51
|
+
setInitialSearch({ ...search, channel: defaultChannel ? defaultChannel : 'lettings' });
|
52
|
+
}
|
39
53
|
}
|
40
54
|
|
41
55
|
handleSubmit(e) {
|