Skip to main content

All Questions

0 votes
0 answers
21 views

How can I set formatters for more than one column in React-Google-Charts?

Trying to use React Google Charts, I am facing a problem when I want to format several columns. In all the examples I found on the web, only one column is formatted through one of these two methods: ...
azap's user avatar
  • 1
0 votes
0 answers
1k views

How to format numeric input in React with react-hook-form to include decimal and thousands separators, zero-filling, and raw numeric value submission?

I want to create a form that allows the user to enter numbers in the format "1,500.00". The form should send this data to the server. However, the server only accepts numbers in the format &...
Luominous's user avatar
7 votes
4 answers
33k views

formatting of chat gpt responses [closed]

I am using chat gpt api on my react application. The problem i am facing is how to format the response coming from chat gpt. If is ask it to give me a response in table format it provides weird ...
Abdullah Saleem's user avatar
1 vote
0 answers
326 views

Convert HTML to react material ui

I am porting an app from html to React. I have about 400 lines of html in one or two files that I dont want to have to manually convert into Grid and other components of reacts material-ui. For ...
mvarta's user avatar
  • 23
0 votes
1 answer
71 views

Formatting array objet values within a column using line breaks in material ui table cell

Given the following array data: let myArr = [ { id: 1, name: "A", people: [ { myId: 2, myName: "Name: Fred Likes: Apples" }, { myId: 3, myName: "...
ArthurJ's user avatar
  • 859
1 vote
1 answer
366 views

React - \n of my JSON.String disappears after getting put in div

In my NFTDetails component is a description that comes out of a JSON. There are \n\n in it. There is no new line when I use the value of the JSON in a div, but there are new lines in the Firefox ...
tintlingf's user avatar
1 vote
1 answer
911 views

ReactJS + Button with updating text overflowing/exceeding button size

I've currently got a button module, which, based on an array it is given, generates a button with an Image, and Text. However, now that i started adding translations to the buttons, I noticed that ...
Vlad SD's user avatar
  • 271
0 votes
1 answer
25 views

How do I format a string based on certain delimeters in reactjs?

Let a = "cat AND mouse AND hen OR pig AND cow OR horse" Expected output ="((cat AND mouse AND hen) OR (pig AND cow) OR horse)" All the consecutive AND should be inside a bracket.
dhanam ravi's user avatar
-1 votes
1 answer
337 views

How to format Array of Object with respect to the data inside of it in JavaScript

I am trying to make an Array of Object which adds the same weekday data in one object like if we have weekday:1 in five objects then we will get {...{}, weekDay:1, repeated:5} This is dynamic data I ...
Muhammad Hussain's user avatar
0 votes
1 answer
2k views

How can I sanitize formatted text for any input in React?

I have several inputs on an app using the Field component from redux-forms, and I'm trying to implement something that allows me to save the input as plain-text and not formatted (i.e.,𝙀𝙙𝙪𝙖𝙧𝙙𝙤 ...
Gonzalo Garcia's user avatar
0 votes
1 answer
43 views

Error while formating date with a function

I have a function that takes in a date and formats it. It works for time such as "10.33" and "9.33", but for "10.09" it wrongly shows "10.9" instead, and the "0" disappears. Can anyone see the error ...
Arte's user avatar
  • 417
2 votes
1 answer
2k views

how do you paste only plain text on react-quill?

I using React quill as a custom text editor in my web application and I cannot figure out how to make it only paste plain text when users try to paste. Formatting causes a lot of issues with my code. ...
Tadewos Bellete's user avatar
1 vote
1 answer
120 views

Why VS Code Formatter damage my JSX codes

I'm getting the error in the below image I used 2 VSCode plugins Prettier and Beautify both made the same error unfortunately , it's too late to undo my changes related issues 1 2 I tried to ...
27mdmo7sn's user avatar
  • 509
19 votes
6 answers
74k views

React - How to format phone number as user types

I need to format a 10 digit string to this format: '(123) 456-7890'. However, I need this to happen as the user types. So if the user has inputted only 3 digits, the input should display: '(123)'. If ...
user avatar
0 votes
1 answer
4k views

Format TextInput in onChangeText to dollar amount in React Native using Redux

I struggle to find a proper solution to format the number input in a TextInput using the onChangeText function in React Native using Redux. I tried using the function .toFixed(2), but the issue is ...
Benjamin Heinke's user avatar

15 30 50 per page