<commit_before>import React, { PureComponent, PropTypes } from 'react';
import IconButton from 'react-md/lib/Buttons/IconButton';
import Card from 'react-md/lib/Cards/Card';
import CardTitle from 'react-md/lib/Cards/CardTitle';
import { DataTable, TableHeader, TableBody, TableRow, TableColumn } from 'react-md/lib/DataTables';
import Autocomplete from 'react-md/lib/Autocompletes';
import TextField from 'react-md/lib/TextFields';

import { GITHUB_LINK } from 'constants';
import { sort } from 'utils/ListUtils';
import { toPropTypeId } from 'utils/StringUtils';
import Markdown from 'components/Markdown';
import PropTypesRow from './PropTypesRow';
import ComponentMethods from './ComponentMethods';

import docgenMethodsPropTypes from 'constants/docgenMethodsPropTypes';

export default class DocgenPropTypes extends PureComponent {
  constructor(props) {
    super(props);

    const propList = Object.keys(props.props).map(name => ({ name, ...props.props[name] }));

    this.state = {
      propList,
      propFilter: '',
      ascending: true,
      visibleProps: sort(propList, 'name', true),
    };
  }

  static propTypes = {
    mobile: PropTypes.bool.isRequired,
    tablet: PropTypes.bool.isRequired,
    component: PropTypes.string.isRequired,
    source: PropTypes.string.isRequired,
    description: PropTypes.string.isRequired,
    props: PropTypes.object.isRequired,
    methods: docgenMethodsPropTypes,
  };

  _sort = () => {
    const ascending = !this.state.ascending;
    this.setState({
      ascending,
      visibleProps: sort(this.state.visibleProps, 'name', ascending),<commit_msg>Fixed the Documentation Website not Updating<commit_after>import React, { PureComponent, PropTypes } from 'react';
import IconButton from 'react-md/lib/Buttons/IconButton';
import Card from 'react-md/lib/Cards/Card';
import CardTitle from 'react-md/lib/Cards/CardTitle';
import { DataTable, TableHeader, TableBody, TableRow, TableColumn } from 'react-md/lib/DataTables';
import Autocomplete from 'react-md/lib/Autocompletes';
import TextField from 'react-md/lib/TextFields';

import { GITHUB_LINK } from 'constants';
import { sort } from 'utils/ListUtils';
import { toPropTypeId } from 'utils/StringUtils';
import Markdown from 'components/Markdown';
import PropTypesRow from './PropTypesRow';
import ComponentMethods from './ComponentMethods';

import docgenMethodsPropTypes from 'constants/docgenMethodsPropTypes';

export default class DocgenPropTypes extends PureComponent {
  constructor(props) {
    super(props);

    const propList = this._makePropList(props);

    this.state = {
      propList,
      propFilter: '',
      ascending: true,
      visibleProps: sort(propList, 'name', true),
    };
  }

  static propTypes = {
    mobile: PropTypes.bool.isRequired,
    tablet: PropTypes.bool.isRequired,
    component: PropTypes.string.isRequired,
    source: PropTypes.string.isRequired,
    description: PropTypes.string.isRequired,
    props: PropTypes.object.isRequired,
    methods: docgenMethodsPropTypes,
  };

  componentWillReceiveProps(nextProps) {
    if (this.props.props !== nextProps.props) {
      const propList = this._makePropList(nextProps);
      this.setState({
        propList,
        propFilter: '',
        ascending: true,
        visibleProps: sort(propList, 'name', true),
      });
    }
  }

  _makePropList(props) {
    return Object.keys(props.props).map(name => ({ name, ...props.props[name] }));
  }

  _sort = () => {
    const ascending = !this.state.ascending;
    this.setState({
      ascending,
      visibleProps: sort(this.state.visibleProps, 'name', ascending),
{'fraction_non_alphanumeric': 0.12086092715231789, 'fraction_numerical': 0.0, 'mean_word_length': 4.127298444130127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '975805', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1070, 'n_words': 243}