Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

102
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda