Fix failing feature tests

pull/7171/head^2
Aditya Toshniwal 2024-01-30 13:01:57 +05:30
parent 028b70203c
commit cdf49d6300
2 changed files with 4 additions and 4 deletions

View File

@ -216,13 +216,13 @@ export default function ObjectNodeProperties({panelId, node, treeNodeInfo, nodeD
schema.filterGroups = [gettext('Security')];
}
// Reset stale counter.
useEffect(()=> {
useMemo(()=> {
staleCounter.current = 0;
}, [nodeData?._id]);
const key = useMemo(()=>{
// If node data is updated increase the counter to show updated data.
if(isStale){
if(isStale) {
staleCounter.current += 1;
}
if( actionType != 'properties' || isActive) {

View File

@ -73,12 +73,12 @@ function CustomRow(props) {
const rowRef = useRef();
const dataGridExtras = useContext(DataGridExtrasContext);
const rowInfoValue = useMemo({
const rowInfoValue = useMemo(()=>({
rowIdx: props.rowIdx,
getCellElement: (colIdx)=>{
return rowRef.current?.querySelector(`.rdg-cell[aria-colindex="${colIdx+1}"]`);
}
}, [props.rowIdx]);
}), [props.rowIdx]);
if(!props.isRowSelected && props.selectedCellIdx > 0) {
dataGridExtras.onSelectedCellChange?.([props.row, props.viewportColumns?.find(columns => columns.idx === props.selectedCellIdx)]);