Plants vs. Zombies: Replanted - v1.0.3
    Preparing search index...

    Interface ITableFilter

    interface ITableFilter {
        component: ComponentType<IFilterProps>;
        dataId?: string;
        isEmpty?: (filter: any) => boolean;
        matches: (filter: any, value: any, state: any) => boolean;
        raw: string | boolean;
    }
    Index

    Properties

    component: ComponentType<IFilterProps>
    dataId?: string

    specifies which property of the object to filter on, meaning that obj[dataId] will be passed to the "matches" function as the value to filter by. This can be $ (a single dollar sign) to get the object itself

    isEmpty?: (filter: any) => boolean

    return true if the specified filter will not filter out any elements if not specified the filter will be assumed to be "empty" if it's not truthy

    matches: (filter: any, value: any, state: any) => boolean

    return true if value matches the filter

    Type Declaration

      • (filter: any, value: any, state: any): boolean
      • Parameters

        • filter: any

          the filter pattern to filter by

        • value: any

          the row value for the specified column

        • state: any

          application state, usually an IState object but may contain additional fields from extensions

        Returns boolean

    the raw parameter controls what value actually gets passed into matches. If raw is false, value will be the output of the calc function of the ITableAttribute. If raw is true, value will be the raw value of the table item where the name matches the table attribute. So if the table attribute has id "name" then value would be tableitem["name"]. If raw is a string, that is used instead of the table attribute id. If ITableAttribute.calc doesn't simply transform an attribute of the item but consults a separate data source, you have to set raw to false, there is no way to get correct results otherwise. If calc returns localized strings for example you will want to use raw, generally it is often simpler to deal with raw values (true instead of "Enabled")

    raw: string | boolean

    this controls what value gets passed into the matches function, see the documentation there for possible values