main

mattermost/focalboard

Last updated at: 29/12/2023 09:42

property.tsx

TLDR

This file exports a class MultiPersonProperty which extends the PropertyType class from the types module. It also imports a MultiPerson component from the same directory.

Classes

MultiPersonProperty

This class represents a property type called "MultiPerson". It extends the PropertyType class and provides the following properties:

  • Editor: A reference to the MultiPerson component.
  • name: The name of the property type, which is "MultiPerson".
  • type: The type of the property, which is "multiPerson".
  • displayName: A function that returns a localized display name for the property type.
  • canFilter: A boolean indicating whether the property can be used for filtering.
  • filterValueType: The type of value that can be used for filtering.
// 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 MultiPerson from './multiperson'

export default class MultiPersonProperty extends PropertyType {
    Editor = MultiPerson
    name = 'MultiPerson'
    type = 'multiPerson' as PropertyTypeEnum
    displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.MultiPerson', defaultMessage: 'Multi person'})
    canFilter = true
    filterValueType = 'person' as FilterValueType
}