[Feature request] TextInput/Text switch #387
Replies: 4 comments
-
This is an awesome component! I'm moving this over to Discussions and we can continue the conversation there... |
Beta Was this translation helpful? Give feedback.
-
Hi @michaelw88 Thanks for the suggestion—this is a fantastic idea, and I’d love to see it in DMC too. However, it’s currently not on our roadmap to add components that aren’t part of the upstream Mantine library. Here are a couple of ways we could still make this happen:
Feel free to share a link to what you have so far - I'm very interested to see how you created this component. |
Beta Was this translation helpful? Give feedback.
-
Hi @AnnMarieW , here is the link: https://github.com/michaelw88/dash-mantine-components/blob/dc5883bf6892fbdb768205293c15790798a18c34/src/ts/components/core/input/EditableText.tsx Good I asked before making the PR. I will try my luck with Mantine or publish as DMC community component. As Codebase is there, maybe they will take it on. |
Beta Was this translation helpful? Give feedback.
-
Hello @michaelw88, I believe that this falls more in the realm of an AIO component. As the comment is always dependent upon the
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I am thinking about implementing a new component that basically wraps the Text and TextInput (and Textarea) component and allow seamless switchting between the two. E.g., consider a Dashboard where a user can provide commentar or adjust some chart titles, I would display normal text by default, but could switch to an inline text edit by switching out the Text to the TextInput component.
Code would nearly ready, see here for a very simple sample app: https://py.cafe/michaelw88/dash-app-editable-text-toggle (Button switches between mode. Doubleclick on Text also switches to TextInput).
This behaviour can be achieved also with normal dash callbacks or even CSS styling. However, such a switch component would simplify this significantly. Hence before doing a PR, I would be interested to get some feedback whether we should add such a component directly to dmc or not.
This would also go in hand nicely with the new PR on debounce (e.g., hit enter switches back to Text).
Beta Was this translation helpful? Give feedback.
All reactions