I need to show a list or dropdown when user enters a specific character like '@' or '{{ }}' in the input text area, from which an option can be selected and then used in the text area. Is there any specific library for this in React.js? Or any short solution for this in React?
React - Drop down list on typing specific character in input field(example - {{ or @ )
1.9k Views Asked by Deepesh gulati At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in REACTJS
- ussd reader in Recket Native module
- Teams tab application returns SSO error in mobile Outlook
- Github Pages Deployment deploys a blank page
- Is there any way to glow this bulb image like a real light bulb
- Optimize LCP ReactJs
- Page in React only renders elements after refreshing
- Unable to Post Form Data to MongoDB because of picturepath
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- Hooks are not supported inside an async component error in nextjs project using useQuery
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- On the server side, it returns undefined but on the client side, logs the values no problem
- Multilevel dropdown with checkboxes in Select component
- TypeScript Error only on big type only when assigned to a variable
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Data is not filtering in props. Showing passdata.map is not a function
Related Questions in MATERIAL-UI
- Multilevel dropdown with checkboxes in Select component
- Why a component? Drawer of mui Does not work inside Iframe
- Next js delay before applying Emotion and MUI styles
- How can I make a ListItem(in React) in the bottom left corner, in the following example?
- How to Make MUI TextField label behave as default whilst having a Start Input Adornment
- How to add custom property to palette in MUI custom theme
- Can I use a transparent version of the MUI AppBar with the original color from theme?
- Angular Material mat-form-field appearance="outline"
- Using Chart.js library to draw a Line graph using coingeko api is not working properly
- Migrating from MaterialUI to FluentUI
- How to use mui-x without nodejs?
- Display Image in a Material-UI Dialog after clicking an IconButton of the ImageListItemBar
- The filtering screen in mui datagrid is broken
- Material 3 Bottom App Bar - Centered FloatingActionButton moved icon to the left instead of right
- MUI autocomplete from a button
Related Questions in DROPDOWN
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- drop down list to decide which range my graph will plot
- Dropdown Values not change in Flutter Modal
- What is the optimal way to detect press outside of a component like a dropdown menu?
- DropdownButtonFormField doesn't apply custom InputDecoration style
- Need to modify the code so that alert appears when user skips a drop down between already selected dropdowns
- n is not a constructor error for bs4.5.2 dropdown and jquery 3.5.1
- Convert HTML Menu Code In Blogger to SubMenu
- PrimeVue Dropdown access country code from #value template to set default selected flag
- CTkScrollableDropdown, how to change dynamically the values
- How to insert JSON string format into velo (WIX) textbox
- Return value from another cell when a cell has text from a dropdown
- How to auto select item from Fluent UI Dropdown
- Hide the selected DropdownItem's text in the DropdownButton and only display the icon
- Blazor custom dropdown with HTML select and sorting by text, not value for enums
Related Questions in MDBREACT
- couldn't install mdb-react-ui-kit
- designing component by mdbreact
- Contact Form with ReactJS don't sends data to firebase
- Gatsby ReactJS importing CSS from modules infinite loading
- Unable to update state from onClick event of MDBDatable row in React
- npm install mdbreact ERR
- How do i fix items not being shown on screen from mongo db?
- No styling or icons appear when I use a mdbreact component - Footer
- mdbreact error - Element type is invalid: expected a string (for built-in components)
- React.js: Collapsible menu does not return to original state
- Use props.data to construct auotmaticaly a MDBNav for my React proyect
- How to fetch data from api already in props using MDBDataTable
- Using props.data with MDBNav, how to activate the active TAB or LINK
- how to activate the active TAB or LINK in the MDBNav of MDBreact.?
- How remove the default "CLICK" name for the button when using MDBModal?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can monitor the input from the text area and check for the specific character with a regex. Use a state that mounts a component with suggestions when true. Selecting an option would insert it in the text and set the mount state to false. Clicking away should do the same (and MUI includes a click away listener helper component).
Here is a small demo as a proof-of-concept: https://codesandbox.io/s/magical-browser-dk981?file=/src/App.tsx
This demo is obviously not polished, there are no intelligent suggestions as you type, you'll have to implement that yourself. Good luck. :)