Comments (11)
I would vote against this idea. If you can't display some options below your cursor position I would guess your controls are too close to the window border anyways. See the GitHub comment box for instance. Even if you resize your window the list still opens to the bottom. This way you also keep a consistent user experience. Changing the position to top, would also need to reverse the sorting and also the meaning of the up and down arrows.
from react-mentions.
I think this is a great idea. I am running into this while building a chat feature with the input box at the bottom of the screen. I want something similar to slack's input:
from react-mentions.
Okay, you're maybe right.
What about limiting the displayed suggestions?
from react-mentions.
Can be easily done with CSS or the data source.
from react-mentions.
Also the slack kind of displaying the suggestions is a pure CSS issue.
.suggestions {
left: 0;
bottom: 100%;
width: 90%;
}
and you get this kind of style. The reason why I'm so reluctant to including stuff like this is that our main focus of this component is retrieving mentions for a given set of keywords. We don't ship with CSS because the part of displaying should be totally up to you.
from react-mentions.
But you can navigate only with the up
and down
arrows, not left
and right
.
from react-mentions.
This seems no longer works since top
style attribute is overwritten.
from react-mentions.
We included an example that shows you how you can do it. It's in the "advanced" example.
from react-mentions.
Thanks, it worked!
from react-mentions.
Also the slack kind of displaying the suggestions is a pure CSS issue.
.suggestions { left: 0; bottom: 100%; width: 90%; }
and you get this kind of style. The reason why I'm so reluctant to including stuff like this is that our main focus of this component is retrieving mentions for a given set of keywords. We don't ship with CSS because the part of displaying should be totally up to you.
But this code is not working for me .. I want to display the list above the input element ..Any suggestion ?
from react-mentions.
how can I control open/ close of suggestions in react mention? any ideas....please
from react-mentions.
Related Issues (20)
- [rl-reuse_tool-4] Violation against OSS Rules of Play
- Warning: React does not recognize the `displayTransform` prop on a DOM element. HOT 1
- Mentions don't scroll in scrollable textboxes
- Background color from mention hides on google chrome HOT 2
- Ability to pass a number as a prop to control how many times the trigger can occur
- Cursor jumps to the end of the textarea when cut (cmd+x) action is performed HOT 1
- What's the best way to change the font color of the placeholder text in the input field? HOT 3
- Absolutely not working in typescript!! HOT 1
- How do mention everyone like @all in react mentions?? HOT 1
- Not able to place image along with text in textarea
- How to allow user to resize the textarea? HOT 3
- Styling the display text will also render the default text (2 overlapping versions of the text is displayed) HOT 5
- Mention: Support for defaultProps
- Multiline (Scrollable): Suggestions are not directly below the input cursor/insertion caret when inside another component (present in the react-mentions vercel app) HOT 5
- How to style selected mentions in current input?
- How can I apply conditional formatting to the mentioned words?
- Text Paste Error before typing in textarea HOT 1
- How can i allow filtering data but also choose how I want the data to be stored as HOT 1
- Mentions Ranking/Order Issue
- using react-mentions with mongoDB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-mentions.