简体   繁体   English

“IntrinsicAttributes & AutocompleteProps”类型上不存在属性“limitTags”

[英]Property 'limitTags' does not exist on type 'IntrinsicAttributes & AutocompleteProps

Material UI and Lab Versions I am using我正在使用的 Material UI 和 Lab 版本

"@material-ui/core": "^4.8.3",
"@material-ui/lab": "^4.0.0-alpha.44",

Link to component 链接到组件

My Code我的代码

    <Autocomplete
     multiple
     limitTags={2}

     id="multiple-limit-tags"
     options={Audience}
     getOptionLabel={(option: any) => option.title}
     renderInput={(params) => (
     <TextField {...params} variant="outlined" placeholder="Select collaborator's audience" size="small" />
     )}
 />

This attribute is creating issue此属性正在创建问题

limitTags={2}

limitTags feature is added in - 4.0.0-alpha.47 version在 - 4.0.0-alpha.47版本中添加了limitTags功能

"@material-ui/lab": "^4.0.0-alpha.47",

在此处输入图像描述

You should update your npm packages and it should solve your problem.您应该更新您的 npm 软件包,它应该可以解决您的问题。

Working exmaple for autocomplete with limit tags is here - https://codesandbox.io/s/s81k4带有限制标签的自动完成工作示例在这里 - https://codesandbox.io/s/s81k4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 属性…在类型&#39;IntrinsicAttributes&…&#39;上不存在 - Property … does not exist on type 'IntrinsicAttributes & …' 属性..在类型“IntrinsicAttributes &amp;..”上不存在 - Property .. does not exist on type 'IntrinsicAttributes & ..' “IntrinsicAttributes &amp; CustomComponentProps”类型上不存在属性“prop” - Property 'prop' does not exist on type 'IntrinsicAttributes & CustomComponentProps' React forwardRef - 类型 IntrinsicAttributes 上不存在属性 - React forwardRef - Property does not exist on type IntrinsicAttributes “IntrinsicAttributes”类型上不存在属性“ref” - Property 'ref' does not exist on type 'IntrinsicAttributes' React-类型IntrinsicAttributes上不存在属性 - React - Property does not exist on type IntrinsicAttributes 属性“ title”在类型“ IntrinsicAttributes&IProps”上不存在 - Property 'title' does not exist on type 'IntrinsicAttributes & IProps' “IntrinsicAttributes”类型上不存在模态属性“show” - Modal Property 'show' does not exist on type 'IntrinsicAttributes' 类型“IntrinsicAttributes”上不存在属性“history” - Property 'history' does not exist on type 'IntrinsicAttributes 类型“IntrinsicAttributes &amp; InferPropsInner”上不存在属性“X” - Property 'X' does not exist on type 'IntrinsicAttributes & InferPropsInner
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM