property.tsx
TLDR
This file exports a class called TextProperty
which extends PropertyType
. It provides a Text editor for the Text property type and defines some properties and methods related to this type.
Classes
TextProperty
This class extends the PropertyType
class and represents the Text property type. It provides the following properties and methods:
-
Editor
: A reference to theText
component used as the editor for this property type. -
name
: The name of the property type, which is 'Text'. -
type
: The type of the property, which is 'text'. -
displayName
: A function that returns the display name of the property type, using theintl
object to format the message. -
canFilter
: A flag indicating whether the property can be used as a filter. This property is set totrue
for the Text property type. -
filterValueType
: The type of the value used for filtering. This property is set to 'text' for the Text property type.
// 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 Text from './text'
export default class TextProperty extends PropertyType {
Editor = Text
name = 'Text'
type = 'text' as PropertyTypeEnum
displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Text', defaultMessage: 'Text'})
canFilter = true
filterValueType = 'text' as FilterValueType
}