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

115
Vistas
AG Grid moveColumn to ignore hidden columns

I am attempting to use ag-grid's moveColumn API. Our grid has the following default state:

{
    applyOrder: true,
    defaultState: {hide: true} // <-- debugging suggest this is line of issues
}

This means for columns that do not have a hide prop, it will auto be set to false.

However, when I use moveColumn, the API counts to hidden columns in the index count. For example:

Data:

[
    {
        colid: 'Name',
        hide: false,
        pivot: false,
        width: 100,
    },
    {
        colid: 'Age',
        hide: true,
        pivot: false,
        width: 100,
    },
    {
        colid: 'Gender',
        hide: true,
        pivot: false,
        width: 100,
    },
    {
        colid: 'Height',
        hide: true,
        pivot: false,
        width: 100,
    },
    {
        colid: 'Eye Colour',
        hide: false,
        pivot: false,
        width: 100,
    },
    {
        colid: 'Hair Colour',
        hide: false,
        pivot: false,
        width: 100,
    },

]

If i call columnApi.moveColumn('Eye Colour', 3); i would expect Eye Colour to appear after the Hair Colour column given Age, Gender and Height are all set to hidden.

Note, if I remove defaultState: {hide: true} then all works as expected however it is quite important to have this to handle unknown columns.

about 4 years ago · Santiago Trujillo
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