mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the search filter should be cleared when a new row is added to the user management. #5261
This commit is contained in:
@@ -246,7 +246,11 @@ export function DataGridHeader({label, canAdd, onAddClick, canSearch, onSearchTe
|
||||
</Box>
|
||||
}
|
||||
<Box className={classes.gridControls}>
|
||||
{canAdd && <PgIconButton data-test="add-row" title={gettext('Add row')} onClick={onAddClick} icon={<AddIcon />} className={classes.gridControlsButton} />}
|
||||
{canAdd && <PgIconButton data-test="add-row" title={gettext('Add row')} onClick={()=>{
|
||||
setSearchText('');
|
||||
onSearchTextChange('');
|
||||
onAddClick();
|
||||
}} icon={<AddIcon />} className={classes.gridControlsButton} />}
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user