![]() ![]() ![]() This util is used internally when unique prop is passed to the input. Will remove duplicate tags based on value property. This utility is used internally by the input to allow only for valid emails. Pass a string and it will be compared to regular expression to see whether it's email. IsValueValidEmail: (value: string): boolean This object has utilities that are also included in so refer to documentation of that library for more info. You can pass valid key code(s) and they will be used instead to trigger onSubmitRequest callback. When it comes to design, depending on your area of expertise, most of your clients come to you because they want you to help them convey a message. ![]() By default, ENTER key code (13) is the only submission key allowed. This enables you to specify submission key code. This callback is triggered when ENTER key is pressed and query (text value) of the input is empty. onSubmitRequest: (event: SyntheticKeyboardEvent) => void` It allows you to keep track of hidden tag nodes. onTagCountUpdateRequest: (tagCount: number) => voidĬallback that is triggered when the collapsible=true prop is passed, the input is blurred or focused or new tag nodes are received. The factory should return valid React component. Pass this factory if you want to override the provided Counter component and provide your own. The counter displays the amount of hidden tag nodes (the ones that are not visible). This allows you to style the input via CSS and add overflow property onto the input.Īdditionally, it renders so-called Counter component which is displayed next to the input. This means that it will add extra class names if you focus / blur the input. If you try to insert the email that was already added, it will not do anything by default. Will only allow to display and add unique tags based on their value property. In short you need to pass at least these props: Please refer to that documentation to see all the details. This input receives the same props as components in library. The input is opinionated and will not allow you to create tags that are not valid emails. Additionally it exposes utils object which is a collection of utilities that can be used alongside the input. This library exposes AvocodeEmailTagsInput React component, it should be used as controlled component. It is built upon better-react-tagsinput dependency which itself is based on SlateJS. React input component for rendering, creating and deleting tags that match emails. ![]()
0 Comments
Leave a Reply. |