pa help po please
yung sinasabi naming buong code is kasama na yung html mismo aside sa javascript mo. Di kasi namin ma determine kung saan ka nag kulang kung yung snippet lang pinapakita mo.
<div className='search_bar'>
<input type="text" />
<div className='search_icon'><AiIcons.AiOutlineSearch style={{fontSize:'30px'}} /></div>
</div>
<div className='user_list'>
<div className='list_of_user'>
<div className='group_user'><FaIcons.FaUsers/></div>
List of Users
</div>
<div className='all_users'>
<table id='myTable'>
<thead>
<tr><th><input type="checkbox" className='checkbox' /></th>
<th>Id</th>
<th>Name</th>
<th>Email Address</th>
<th>Position</th>
<th>Region</th>
<th>District</th>
<th>Access Level</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{list.map((data)=>
<tr>
<td><input type="checkbox" className='checkbox' /></td>
<td>{data.ID}</td>
<td>{data.LNAME+','+data.FNAME+' '+data.MNAME}</td>
<td>{data.EMAIL}</td>
<td>{data.POSITION}</td>
<td>{data.REGION}</td>
<td>{data.DISTRICT}</td>
<td>{data.ACCES_LV}</td>
<td><AiIcons.AiOutlineEdit style={{fontSize:'25px',marginRight:'10px'}}/><AiIcons.AiOutlineDelete onClick={()=>{setopenDelModal(true)}} style={{fontSize:'25px'}}/></td>
</tr>)}
</tbody>
</table>
</div>
</div>
</div>
{openDelModal && <Deletemodal closeModalBtn={setopenDelModal} />}
</div>
);
};
export default Users;
Paanong nawawala 'yung effect? Hindi na nagana o nawawala 'yung kulay? Tsaka ayan na ba 'yung buong javascript code?
gumagan po pero nawawala din po ...
<div className='search_bar'>
<input type="text" />
<div className='search_icon'><AiIcons.AiOutlineSearch style={{fontSize:'30px'}} /></div>
</div>
<div className='user_list'>
<div className='list_of_user'>
<div className='group_user'><FaIcons.FaUsers/></div>
List of Users
</div>
<div className='all_users'>
<table id='myTable'>
<thead>
<tr><th><input type="checkbox" className='checkbox' /></th>
<th>Id</th>
<th>Name</th>
<th>Email Address</th>
<th>Position</th>
<th>Region</th>
<th>District</th>
<th>Access Level</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{list.map((data)=>
<tr>
<td><input type="checkbox" className='checkbox' /></td>
<td>{data.ID}</td>
<td>{data.LNAME+','+data.FNAME+' '+data.MNAME}</td>
<td>{data.EMAIL}</td>
<td>{data.POSITION}</td>
<td>{data.REGION}</td>
<td>{data.DISTRICT}</td>
<td>{data.ACCES_LV}</td>
<td><AiIcons.AiOutlineEdit style={{fontSize:'25px',marginRight:'10px'}}/><AiIcons.AiOutlineDelete onClick={()=>{setopenDelModal(true)}} style={{fontSize:'25px'}}/></td>
</tr>)}
</tbody>
</table>
</div>
</div>
</div>
{openDelModal && <Deletemodal closeModalBtn={setopenDelModal} />}
</div>
);
};
export default Users;
Paanong nawawala 'yung effect? Hindi na nagana o nawawala 'yung kulay? Tsaka ayan na ba 'yung buong javascript code?
opo yan lang po yung buong javascript nya
var table = document.getElementById('myTable');
var rows = document.getElementsByTagName('tr');
for(var i=0; i <rows.length;i++){
var currentRow = table.rows
;
currentRow.onclick=function(){
[...this.parentElement.children].forEach((el)=>el.classList.remove('selected-row'));
this.classList.add("selected-row");
}
}
Good day admin ,and members of the group ..
gusto ko po sana yung table row pag click mag kakaron ng kulay...
ngayon po meron po ako nakita sa net , sinundan ko lang po ....
GUMANA NAMAN PO SYa....ang problema po once mag REFResh PO YUNG page AYAW NA PO NYa GUMANA..
tapos po napansin ko GUMAGANA po uli sya once mag click po ako ng element na meron 'onClick'..
eto po yung code .. Please help po . thank you po
------------------------------------------------
var table = document.getElementById('myTable');
var rows = document.getElementsByTagName('tr');
for(var i=0; i <rows.length;i++){
var currentRow = table.rows
;
currentRow.onclick=function(){
[...this.parentElement.children].forEach((el)=>el.classList.remove('selected-row'));
this.classList.add("selected-row");
}
}
------------------------------------------------------------------------
**ETO PO YUNG HTML TABLE
<div className='search_bar'>
<input type="text" />
<div className='search_icon'><AiIcons.AiOutlineSearch style={{fontSize:'30px'}} /></div>
</div>
<div className='user_list'>
<div className='list_of_user'>
<div className='group_user'><FaIcons.FaUsers/></div>
List of Users
</div>
<div className='all_users'>
<table id='myTable'>
<thead>
<tr><th><input type="checkbox" className='checkbox' /></th>
<th>Id</th>
<th>Name</th>
<th>Email Address</th>
<th>Position</th>
<th>Region</th>
<th>District</th>
<th>Access Level</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{list.map((data)=>
<tr>
<td><input type="checkbox" className='checkbox' /></td>
<td>{data.ID}</td>
<td>{data.LNAME+','+data.FNAME+' '+data.MNAME}</td>
<td>{data.EMAIL}</td>
<td>{data.POSITION}</td>
<td>{data.REGION}</td>
<td>{data.DISTRICT}</td>
<td>{data.ACCES_LV}</td>
<td><AiIcons.AiOutlineEdit style={{fontSize:'25px',marginRight:'10px'}}/><AiIcons.AiOutlineDelete onClick={()=>{setopenDelModal(true)}} style={{fontSize:'25px'}}/></td>
</tr>)}
</tbody>
</table>
</div>
</div>