Skip to content

Tag: reactjs

Use mui icons between components in react

So I am trying to use mui icons between components. I am using the <Icon /> component but there are two problems with that: Only half of the icon is rendered. I cannot style the icon in the component but instead have to style it where im using the component src/components/sidebar/Sidebar.comp.js (Where …

Multiple Row Edit Functionality in React

I am trying to implement an edit row functionality in a react grid. I have attached 2 links. Link 1 is the GIF which shows the functionality that I have implemented using the below code.(For privacy reasons I cannot publish the actual code) Link 2 is the functionality I am trying to achieve! How shall I do th…

Equivalent of setState callback with React hooks

I have a modal with a list of answers. I can either click an answer to select it, then click a button to confirm my choice. Or I can double-click an answer to select it and confirm. I’m having trouble properly handling the double-click case. With React class components, I would have used setState()&#821…

Display short tags on one line

The picture below is an image of the functionality from the site. In the column “Enter a code” the user can enter data using TagsInput. I would like to slightly improve the functionality so that short tags are displayed on one line. I know that you can apply “inline”, but then long tag…

Pass properties but make exceptions in React

There is something common that sometimes we all do. Wrap dom elements in custom components <CustomComponet id=”abc” title=”abc” nonDomProp=”abc” …andsoforth /> Custom component in this example wraps button which has the properties id and title but not nonDomProp…