Metamaps.Filter bug and use _.omit instead of util function
This commit is contained in:
parent
79aa7717ed
commit
045bd3fd73
3 changed files with 3 additions and 12 deletions
|
@ -186,7 +186,7 @@ const Filter = {
|
||||||
$('#filter_by_' + listToModify + ' li[data-id="' + identifier + '"]').fadeOut('fast', function () {
|
$('#filter_by_' + listToModify + ' li[data-id="' + identifier + '"]').fadeOut('fast', function () {
|
||||||
$(this).remove()
|
$(this).remove()
|
||||||
})
|
})
|
||||||
index = self.visible[filtersToUse].indexOf(identifier)
|
const index = self.visible[filtersToUse].indexOf(identifier)
|
||||||
self.visible[filtersToUse].splice(index, 1)
|
self.visible[filtersToUse].splice(index, 1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { Component, PropTypes } from 'react'
|
import React, { Component, PropTypes } from 'react'
|
||||||
import { objectWithoutProperties } from '../utils'
|
import _ from 'lodash'
|
||||||
|
|
||||||
const MapLink = props => {
|
const MapLink = props => {
|
||||||
const { show, text, href, linkClass } = props
|
const { show, text, href, linkClass } = props
|
||||||
const otherProps = objectWithoutProperties(props, ['show', 'text', 'href', 'linkClass'])
|
const otherProps = _.omit(props, ['show', 'text', 'href', 'linkClass'])
|
||||||
if (!show) {
|
if (!show) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
export const objectWithoutProperties = (obj, keys) => {
|
|
||||||
const target = {}
|
|
||||||
for (let i in obj) {
|
|
||||||
if (keys.indexOf(i) !== -1) continue
|
|
||||||
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue
|
|
||||||
target[i] = obj[i]
|
|
||||||
}
|
|
||||||
return target
|
|
||||||
}
|
|
Loading…
Reference in a new issue