Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

98
Visualizações
Custom place of filter input in react-bootstrap-table

I'm using react-bootstrap-table and I want to place the input filter of table columns in top of the table not on top/bottom on the column (default behavior).

I looked at this question Showing Select filter at custom place in react-bootstrap-table2, but I couldn't implement what he suggested:

.. i added a select> & created ref for respective column & write a simple line that runs on Change event of select> this.refs.COLUMN_NAME.applyFilter("column_value_from_select_control");

I created a ref for the table, and I placed an input field on top of the table like this:

<input type="text" class="form-control" id="id1" placeholder="enter name" onChange={handleFilter}></input>

    <BootstrapTable
            bootstrap4
            marginLeft="20px"
            keyField="id"
            data={data}
            columns={columns}
            hover
            ref={inputRef}
            ..
    />

onChange of the input I call this method, in console log i can see the the column that i want to filter with its data, but I don't know how to call textFilter() of react-bootstrap-table.

const handleFilter = () => {
    console.log("test = ", inputRef.current.props.columns[5])
  };
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda