Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
lankovova committed May 8, 2020
1 parent af6d266 commit 9b5ebc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Item.tsx
Expand Up @@ -69,13 +69,13 @@ class Item extends Component<ItemProps> {
super(props);
const { disabled, hidden, nativeEvent, propsFromTrigger, data } = this.props;

const getBooleanPredicateValue = (predicateFunc: BooleanPredicate) => {
return typeof predicateFunc === 'function'
? predicateFunc({
const getBooleanPredicateValue = (predicate: BooleanPredicate) => {
return typeof predicate === 'function'
? predicate({
event: nativeEvent as TriggerEvent,
props: { ...propsFromTrigger, ...data }
})
: predicateFunc;
: predicate;
}

this.isDisabled = getBooleanPredicateValue(disabled)
Expand Down

0 comments on commit 9b5ebc5

Please sign in to comment.