LMInputContext
Introduction
The LMInputContext
provides the data and functions related to Input components. It wraps all the components inside LMInput
. You can use this context to manage or access data and functions related to input actions.
Property | Type | Description | Optional |
---|---|---|---|
inputBoxRef | MutableRefObject<HTMLDivElement \| null> | Reference to the input box element. | |
inputWrapperRef | MutableRefObject<HTMLDivElement \| null> | Reference to the input wrapper element. | |
inputText | string | The current input text value. | |
matchedTagMembersList | Member[] | List of matched tag members. | |
fetchMoreTags | boolean | Indicates if more tags need to be fetched. | |
imagesAndVideosMediaList | File[] \| null | List of selected image and video files. | ✔️ |
documentsMediaList | File[] \| null | List of selected document files. | ✔️ |
ogTag | OgTag | null | Open Graph tag data. | ✔️ |
gifMedia | Gif \| null | Selected GIF media. | ✔️ |
gifs | Gif[] | List of fetched GIFs. | |
loadingGifs | boolean | Indicates if GIFs are being loaded. | |
errorOnGifs | string \| null | Error message for GIF fetching. | ✔️ |
gifQuery | string | Search query for GIFs. | |
openGifCollapse | boolean | Whether the GIF section is open. | |
updateInputText | onChangeUpdateInputText | Function to update the input text. | |
onTextInputKeydownHandler | onKeydownEvent | Keydown event handler for the input. | |
onTextInputKeyUpHandler | onKeyUpEvent | Keyup event handler for the input. | |
clearTaggingList | ZeroArgVoidReturns | Function to clear the tagging list. | |
addEmojiToText | TwoArgVoidReturns<EmojiData, MouseEvent:gt; | Function to add an emoji to the input text. | |
addImagesAndVideosMedia | OneArgVoidReturns<ChangeEvent<HTMLInputElement>> | Function to add images and videos. | |
addDocumentsMedia | OneArgVoidReturns<ChangeEven<<HTMLInputElement>> | Function to add document files. | |
postMessage | OneOptionalArgVoidReturns<Record<string, any>> | Function to post a message. | |
getTaggingMembers | OneOptionalArgVoidReturns<number> | Function to fetch tagging members. | |
removeOgTag | ZeroArgVoidReturns | Function to remove Open Graph tag data. | |
setGifMedia | Dispatch<Gif \| null> | Function to set the selected GIF media. | |
setOpenGifCollapse | Dispatch<boolean> | Function to toggle the GIF section. | |
gifSearchQuery | OneArgVoidReturns<string> | Function to update the GIF search query. | |
fetchGifs | OneArgVoidReturns<string> | Function to fetch GIFs based on a query. | |
handleGifSearch | ZeroArgVoidReturns | Function to handle GIF search actions. | |
removeMediaFromImageList | OneArgVoidReturns<number> | Function to remove an image from the media list. | |
removeMediaFromDocumentList | OneArgVoidReturns<number> | Function to remove a document from the media list. | |
sendDMRequest | OneArgVoidReturns<string> | Function to send a direct message request. | |
rejectDMRequest | ZeroArgVoidReturns | Function to reject a direct message request. | |
aprooveDMRequest | ZeroArgVoidReturns | Function to approve a direct message request. | |
alertMessage | string \| null | Alert message content. | ✔️ |
shouldShowInputBox | ZeroArgBooleanReturns | Function to determine if the input box should be shown. |
Reference
For reference checkout this file