JavaFX search filter returns extra rows

I am new to javaFX. I am trying to add a search filter for my table view. I have implement some code and successfully able to filter the rows. Now the problem is I see extra blank row getting displayed on the UI.

Please look at below image: enter image description here

In the below table you can see the extra blank rows. The blank rows grid moves up and down if I keep adding the search text. But there is no such blank row in the table view once I clear the search text.

Please find my search filter code below:

    private TableView<DTO> dataTable;
    private ObservableList<DTO> data = null;
    @FXML
    private TableColumn<DTO, String> nameColumn;
    @FXML
    private TableColumn<DTO, Boolean> userInAppColumn;
    @FXML
    private TableColumn<DTO, Boolean> mappedColumn;
    
    FilteredList<DTO> filteredData = new FilteredList<>(data, p -> true);
    
            // 2. Set the filter Predicate whenever the filter changes.
            fieldSearch.textProperty().addListener((observable, oldValue, newValue) -> {
                filteredData.setPredicate(obj -> {
                    // If filter text is empty, display all persons.
                    if (newValue == null || newValue.isEmpty()) {
                        return true;
                    }
    
                    // Compare first name and last name field in your object with filter.
                    String lowerCaseFilter = newValue.toLowerCase();
    
                    if (String.valueOf(obj.getFriendlyName()).toLowerCase().contains(lowerCaseFilter)) {
                        return true;
                        // Filter matches first name.
    
                    }
                    return false; // Does not match.
                });
            });
    
            // 3. Wrap the FilteredList in a SortedList. 
            SortedList<DTO> sortedData = new SortedList<>(filteredData);
    
            // 4. Bind the SortedList comparator to the TableView comparator.
            sortedData.comparatorProperty().bind(dataTable.comparatorProperty());
            // 5. Add sorted (and filtered) data to the table.
            dataTable.setItems(sortedData);

Below is the code for cell implementation:

  1. Mapped cell implementation:

     mappedColumn.setCellFactory(new Callback<TableColumn<DTO, Boolean>, TableCell<DTO, Boolean>>() {
         // @Override
         public TableCell<DTO, Boolean> call(TableColumn<DTO, Boolean> param) {
             TableCell<DTO, Boolean> cell = new TableCell<DTO, Boolean>() {
                 @Override
                 public void updateItem(Boolean item, boolean empty) {
                     if (item != null) {
                         HBox hbox = new HBox();
                         hbox.setAlignment(Pos.CENTER);
    
                         ImageView imageview = new ImageView();
                         if (item == true)
                             imageview.setImage(new Image(getClass().getResourceAsStream("/images/success.png")));
                         else 
                             imageview.setImage(new Image(getClass().getResourceAsStream("/images/blank.png")));
    
                         hbox.getChildren().add(imageview);
    
                         // SETTING ALL THE GRAPHICS COMPONENT
                         setGraphic(hbox);
                     }
                 }
             };
    
             return cell;
         }
     });
    
  2. Enable cell implementation:

     userInAppColumn.setCellValueFactory(new PropertyValueFactory<DTO, Boolean>("Enable"));
     makeCheckBoxHeader(userInAppColumn);
     userInAppColumn.setEditable(false);     
    
     userInAppColumn.setCellFactory(new Callback<TableColumn<DTO, Boolean>, TableCell<DTO, Boolean>>() {
     // @Override
         public TableCell<DTO, Boolean> call(TableColumn<DTO, Boolean> param) {
             TableCell<DTO, Boolean> cell = new TableCell<DTO, Boolean>() {
                 @Override
                 public void updateItem(Boolean item, boolean empty) {
                     if (item != null) {
                         HBox hbox = new HBox();
                         hbox.setAlignment(Pos.CENTER);
    
                         ImageView imageview = new ImageView();
                         if (item == true)
                                 imageview.setImage(new Image(getClass().getResourceAsStream("/images/success.png")));
                         else
                                 imageview.setImage(new Image(getClass().getResourceAsStream("/images/blank.png")));
    
                         hbox.getChildren().add(imageview);
    
                         // SETTING ALL THE GRAPHICS COMPONENT
                         setGraphic(hbox);
                     }
                 }
             };
    
             return cell;
         }
     });
    
  3. Name cell implementaion:

     nameColumn.setCellValueFactory(new PropertyValueFactory<DTO, String>("friendlyName"));
     nameColumn.setEditable(true);
     nameColumn.setCellFactory(TextFieldTableCell.forTableColumn());
    
     nameColumn.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<DTO, String>>() {
         @Override
         public void handle(CellEditEvent<DTO, String> t) {
    
             ((DTO) t.getTableView().getItems().get(t.getTablePosition().getRow())).setFriendlyName(t.getNewValue());
             ((DTO) t.getTableView().getItems().get(t.getTablePosition().getRow())).setNameChanged(true);
             ((DTO) t.getTableView().getItems().get(t.getTablePosition().getRow())).setOperation(UPDATE);
    
             profileDirty = true;
             updateProfilePageControls();
             updateStatus("", true);
          }
     }); 
    

Please help. I don't want the below rows to be displayed.