View on GitHub
File Changes
import styles from './FilterButton.scss';

                      
type Props = {
-
  numberOfFilterDimensionsApplied?: number,
+
  numberOfFilterDimensionsApplied: number,
  faded: boolean,
  onClick: Function,
};

                      
  static defaultProps = {
    onReset: () => null,
+
    onChange: () => null,
  };

                      
  selfRef: any;
          onChange={selectedDate => {
            if (typeof selectedDate === 'string') {
              if (!selectedDate) {
-
                onChange(selectedDate);
+
                onChange && onChange(selectedDate);
              }
            } else {
-
              onChange(selectedDate.format('YYYY-MM-DD'));
+
              onChange && onChange(selectedDate.format('YYYY-MM-DD'));
            }
          }}
          renderInput={props => (
  "global.labels.create": "!!!Create",
  "global.labels.filter": "!!!Filter",
  "global.labels.remove": "!!!Remove",
+
  "global.labels.reset": "!!!Reset",
  "global.labels.save": "!!!Save",
  "global.language.chinese": "!!!Chinese",
  "global.language.croatian": "!!!Croatian",
        "description": "Title of filter panel.",
        "end": {
          "column": 3,
-
          "line": 26
+
          "line": 27
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.filterBy",
        "start": {
          "column": 12,
-
          "line": 22
+
          "line": 23
        }
      },
      {
        "defaultMessage": "!!!reset",
        "description": "Reset link text on filter panel.",
        "end": {
          "column": 3,
-
          "line": 31
+
          "line": 32
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.reset",
        "start": {
          "column": 9,
-
          "line": 27
+
          "line": 28
        }
      },
      {
        "defaultMessage": "!!!Type",
        "description": "Filter Type.",
        "end": {
          "column": 3,
-
          "line": 36
+
          "line": 37
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.type",
        "start": {
          "column": 8,
-
          "line": 32
+
          "line": 33
        }
      },
      {
        "defaultMessage": "!!!Incoming",
        "description": "Incoming filter type.",
        "end": {
          "column": 3,
-
          "line": 41
+
          "line": 42
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.incoming",
        "start": {
          "column": 12,
-
          "line": 37
+
          "line": 38
        }
      },
      {
        "defaultMessage": "!!!Outgoing",
        "description": "Outgoing filter type.",
        "end": {
          "column": 3,
-
          "line": 46
+
          "line": 47
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.outgoing",
        "start": {
          "column": 12,
-
          "line": 42
+
          "line": 43
        }
      },
      {
        "defaultMessage": "!!!Date range",
        "description": "Date range of filter.",
        "end": {
          "column": 3,
-
          "line": 51
+
          "line": 52
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.dateRange",
        "start": {
          "column": 13,
-
          "line": 47
+
          "line": 48
        }
      },
      {
        "defaultMessage": "!!!This week",
        "description": "This week date range of filter.",
        "end": {
          "column": 3,
-
          "line": 56
+
          "line": 57
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.thisWeek",
        "start": {
          "column": 12,
-
          "line": 52
+
          "line": 53
        }
      },
      {
        "defaultMessage": "!!!This month",
        "description": "This month date range of filter.",
        "end": {
          "column": 3,
-
          "line": 61
+
          "line": 62
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.thisMonth",
        "start": {
          "column": 13,
-
          "line": 57
+
          "line": 58
        }
      },
      {
        "defaultMessage": "!!!This year",
        "description": "This year date range of filter.",
        "end": {
          "column": 3,
-
          "line": 66
+
          "line": 67
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.thisYear",
        "start": {
          "column": 12,
-
          "line": 62
+
          "line": 63
        }
      },
      {
        "defaultMessage": "!!!Custom date range",
        "description": "Custom date range of filter.",
        "end": {
          "column": 3,
-
          "line": 71
+
          "line": 72
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.customDateRange",
        "start": {
          "column": 19,
-
          "line": 67
+
          "line": 68
        }
      },
      {
        "defaultMessage": "!!!Amount range",
        "description": "Amount range of filter.",
        "end": {
          "column": 3,
-
          "line": 76
+
          "line": 77
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "wallet.transaction.filter.amountRange",
        "start": {
          "column": 15,
-
          "line": 72
+
          "line": 73
        }
      },
      {
        "defaultMessage": "!!!ADA",
        "description": "Amount unit.",
        "end": {
          "column": 3,
-
          "line": 81
+
          "line": 82
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
        "id": "global.unit.ada",
        "start": {
          "column": 14,
-
          "line": 77
+
          "line": 78
        }
      },
      {
        "defaultMessage": "!!!Filter",
        "description": "Filter button label.",
        "end": {
          "column": 3,
-
          "line": 86
+
          "line": 87
        },
        "file": "source/renderer/app/components/wallet/transactions/FilterDialog.js",
  "global.labels.create": "Create",
  "global.labels.filter": "Filter",
  "global.labels.remove": "Remove",
-
  "global.labels.save": "Save",
  "global.labels.reset": "Reset",
+
  "global.labels.save": "Save",
  "global.language.chinese": "Chinese",
  "global.language.croatian": "Croatian",
  "global.language.english": "English",
  "wallet.transferFunds.dialog2.passphraseFieldPlaceholder": "Type your spending password",
  "wallet.transferFunds.dialog2.passphraseLabel": "Spending password",
  "wallet.transferFunds.dialog2.title": "Transfer funds from the Balance wallet"
-
}
+
}
\ No newline at end of file
  "global.labels.create": "!!!Create",
  "global.labels.filter": "!!!Filter",
  "global.labels.remove": "!!!Remove",
+
  "global.labels.reset": "!!!Reset",
  "global.labels.save": "!!!Save",
  "global.language.chinese": "!!!kineski",
  "global.language.croatian": "!!!hrvatski",
  "global.labels.create": "作成",
  "global.labels.filter": "フィルター",
  "global.labels.remove": "削除",
+
  "global.labels.reset": "リセット",
  "global.labels.save": "保存",
  "global.language.chinese": "中国語",
  "global.language.croatian": "クロアチア語",
  "wallet.transferFunds.dialog2.passphraseFieldPlaceholder": "送信時パスワードを入力してください",
  "wallet.transferFunds.dialog2.passphraseLabel": "送信時パスワード",
  "wallet.transferFunds.dialog2.title": "残高ウォレットの資金を移し替える"
-
}
\ No newline at end of file
+
}
  "global.labels.create": "!!!Create",
  "global.labels.filter": "!!!Filter",
  "global.labels.remove": "!!!Remove",
+
  "global.labels.reset": "!!!Reset",
  "global.labels.save": "!!!Save",
  "global.language.chinese": "!!!Chinese",
  "global.language.croatian": "!!!Croatian",
  "global.labels.create": "!!!Create",
  "global.labels.filter": "!!!Filter",
  "global.labels.remove": "!!!Remove",
+
  "global.labels.reset": "!!!Reset",
  "global.labels.save": "!!!Save",
  "global.language.chinese": "!!!Chinese",
  "global.language.croatian": "!!!Croatian",
) => {
  const dates = transactions
    .filter(({ date }) => !!date)
-
    .map(({ date }) => date.getTime());
+
    .map(({ date }) => (date ? date.getTime() : 0));
  const amounts = transactions.map(({ amount }) => amount.toNumber());
  const dateRange = DateRangeTypes.ALL;
  const fromDate =
    'Transactions - With filter dialog open',
    ({ locale }: { locale: string }) => (
      <div>
-
        <FilterButton faded={false} onClick={() => null} />
+
        <FilterButton
+
          numberOfFilterDimensionsApplied={1}
+
          faded={false}
+
          onClick={() => null}
+
        />
        <FilterDialog
          dateRange={DateRangeTypes.ALL}
          onFilter={() => null}