|
|
@ -123,8 +123,9 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
const features = map |
|
|
|
const features = map |
|
|
|
.queryRenderedFeatures(e.point) |
|
|
|
.queryRenderedFeatures(e.point) |
|
|
|
.find(feature => feature.source === 'operationLayer'); |
|
|
|
.find(feature => feature.source === 'operationLayer'); |
|
|
|
|
|
|
|
console.log(features); |
|
|
|
if (features) { |
|
|
|
if (features) { |
|
|
|
|
|
|
|
console.log(popupRef.current); |
|
|
|
if (popupRef.current) { |
|
|
|
if (popupRef.current) { |
|
|
|
popupRef.current.postMessage({ |
|
|
|
popupRef.current.postMessage({ |
|
|
|
type: 'matchingRow', |
|
|
|
type: 'matchingRow', |
|
|
@ -140,12 +141,11 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
const targetValue = features.properties.key; |
|
|
|
const targetValue = features.properties.key; |
|
|
|
|
|
|
|
|
|
|
|
const rows = document.getElementsByClassName('ant-table-row'); |
|
|
|
const rows = document.getElementsByClassName('ant-table-row'); |
|
|
|
|
|
|
|
|
|
|
|
const matchingRow = Array.from(rows).find(row => { |
|
|
|
const matchingRow = Array.from(rows).find(row => { |
|
|
|
const rowKey = row.getAttribute('data-row-key'); |
|
|
|
const rowKey = row.getAttribute('data-row-key'); |
|
|
|
return rowKey.startsWith(targetValue); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rowKey.includes(targetValue); |
|
|
|
|
|
|
|
}); |
|
|
|
if (matchingRow) { |
|
|
|
if (matchingRow) { |
|
|
|
matchingRow.scrollIntoView({ |
|
|
|
matchingRow.scrollIntoView({ |
|
|
|
behavior: 'smooth', |
|
|
|
behavior: 'smooth', |
|
|
|