mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 14:36:01 +00:00
filter this value in formview
This commit is contained in:
@@ -152,6 +152,10 @@ export default function FormView(props) {
|
||||
}));
|
||||
};
|
||||
|
||||
const handleFilterThisValue = isDataCell(currentCell)
|
||||
? () => formDisplay.filterCellValue(getCellColumn(currentCell), rowData)
|
||||
: null;
|
||||
|
||||
const handleContextMenu = (event) => {
|
||||
event.preventDefault();
|
||||
showMenu(
|
||||
@@ -161,9 +165,7 @@ export default function FormView(props) {
|
||||
switchToTable={handleSwitchToTable}
|
||||
onNavigate={onNavigate}
|
||||
addToFilter={() => formDisplay.addFilterColumn(getCellColumn(currentCell))}
|
||||
filterThisValue={
|
||||
isDataCell(currentCell) ? () => formDisplay.filterCellValue(getCellColumn(currentCell), rowData) : null
|
||||
}
|
||||
filterThisValue={handleFilterThisValue}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -338,6 +340,11 @@ export default function FormView(props) {
|
||||
copyToClipboard();
|
||||
}
|
||||
|
||||
if (event.keyCode == keycodes.f && event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
if (handleFilterThisValue) handleFilterThisValue();
|
||||
}
|
||||
|
||||
if (event.keyCode == keycodes.f5) {
|
||||
event.preventDefault();
|
||||
onReload();
|
||||
|
||||
Reference in New Issue
Block a user