Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

add image to ag-grid with react

import avatar1 from "../assets/images/avatar1.webp";//Image
export default function List(){
	const userImg = (params) => {
	return `<div>
		<img alt="" class="userListImg" src=${avatar1}/>
      	</div>`;
		}
    
	return (
    <div className="ag-theme-alpine">
      <AgGridReact
        rowData={data}
        onGridReady={onGridReady}
        rowSelection="multiple"
        components={{
          userImg: userImg,
        }}>
     	<AgGridColumn
          field="Username"
          cellRenderer="userListImg"
          sortable={true}
          filter={true}>
       </AgGridColumn>
      </AgGridReact>
    </div>
  );
  };
Comment

PREVIOUS NEXT
Code Example
Javascript :: set file upllaod via javascript to html input 
Javascript :: get total width of element including padding and border using jquery 
Javascript :: round value up javascript 
Javascript :: angularjs dropdown 
Javascript :: axios fainally 
Javascript :: how to choose a random name from a list in javascript 
Javascript :: Node -Cron Run every minute 
Javascript :: html to react converter 
Javascript :: comment out in javascript 
Javascript :: vue 3 router redirect 
Javascript :: jqeury input checkbox listener not working 
Javascript :: javascript array split empty string 
Javascript :: useroutematch 
Javascript :: binary addition javascript 
Javascript :: node.js copy to clipboard 
Javascript :: how to write a json in r 
Javascript :: js countdown 
Javascript :: setstate find opject in state and update 
Javascript :: get the last array element javascript 
Javascript :: how to use js console log 
Javascript :: js copy image to clipboard 
Javascript :: A bad HTTP response code (404) was received when fetching the script. 
Javascript :: reverse the string in javascript 
Javascript :: how to get last child element in javascript 
Javascript :: angular read config from json 
Javascript :: how to see if checkbox is checked 
Javascript :: unshift method in javascript 
Javascript :: moment localization 
Javascript :: loop over an array 
Javascript :: bodyparser express deprecated 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =