property.tsx
TLDR
This file defines a class called UpdatedByProperty
which extends the PropertyType
class. It exports the UpdatedByProperty
as the default export.
Classes
UpdatedByProperty
The UpdatedByProperty
class is a subclass of PropertyType
. It has the following properties and methods:
-
Editor: The
Editor
property is set to theUpdatedBy
component. -
name: The
name
property is set to the string 'Last Modified By'. -
type: The
type
property is set to 'updatedBy'. -
isReadOnly: The
isReadOnly
property is set totrue
. -
displayName: The
displayName
property is a function that takes anintl
object and returns the formatted message for the key'PropertyType.UpdatedBy'
. -
canFilter: The
canFilter
property is set totrue
. -
filterValueType: The
filterValueType
property is set to the string 'person'. -
canGroup: The
canGroup
property is set totrue
.
END
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IntlShape} from 'react-intl'
import {PropertyType, PropertyTypeEnum, FilterValueType} from '../types'
import UpdatedBy from './updatedBy'
export default class UpdatedByProperty extends PropertyType {
Editor = UpdatedBy
name = 'Last Modified By'
type = 'updatedBy' as PropertyTypeEnum
isReadOnly = true
displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.UpdatedBy', defaultMessage: 'Last updated by'})
canFilter = true
filterValueType = 'person' as FilterValueType
canGroup = true
}