Filters done
This commit is contained in:
@@ -14,7 +14,8 @@ class Main extends React.Component {
|
||||
listings: (new Map()),
|
||||
imageIndex: 0,
|
||||
filters: {
|
||||
rooms: {}
|
||||
rooms: {},
|
||||
category: {}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -99,7 +100,14 @@ class Main extends React.Component {
|
||||
|
||||
refreshListings() {
|
||||
const map = this.map;
|
||||
const {rooms, minSize, maxSize, minPrice, maxPrice} = this.state.filters;
|
||||
const {
|
||||
rooms,
|
||||
minSize,
|
||||
maxSize,
|
||||
minPrice,
|
||||
maxPrice,
|
||||
category
|
||||
} = this.state.filters;
|
||||
|
||||
const properties = loadProperties({
|
||||
bounds: map.getBounds().toUrlValue(),
|
||||
@@ -107,7 +115,8 @@ class Main extends React.Component {
|
||||
minSize,
|
||||
maxSize,
|
||||
minPrice,
|
||||
maxPrice
|
||||
maxPrice,
|
||||
category
|
||||
});
|
||||
|
||||
properties.then(p=> p.text()).then(p => {
|
||||
|
||||
Reference in New Issue
Block a user