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

54
Vistas
Make neighboring components independent of each other

The code below represents four components (StyledBreadcrumbs, FilterStatusCode, Filter, LinkedTable).

The FilterStatusCode component allows the user to enter search data using TagInput. And if the user enters a lot of tags, then this component increases and stretches two neighbors - Filter and LinkedTable. Thus breaking the structure of the page.

Tell me how to make it so that stretching the FilterStatusCode component does not affect neighboring components.

   return(
    <Grid sx={ContainerStyle}>
        <StyledBreadcrumbs
            deviceId={props.deviceId}
        />
        
        <Grid container spacing={1} sx={{ width: '100vw', height: '10vh' }}>
            <Grid sx={StyleTableContainer}>
                
                <CardContent>
                    <Table>
                        <TableBody>
                            <TableRow>
                                <TableCell>
                                    <FilterStatusCode
                                        isExpanded={isFilterStatusCodeExpanded}
                                        setIsExpanded={setIsFilterStatusCodeExpanded}
                                        setCodes={props.setCodes}
                                    />
                                </TableCell>
                            </TableRow>
                        </TableBody>
                    </Table>
                    </CardContent>
            </Grid>
          
            <Grid container xs={12} sm={7} lg={9} sx={StyleFilterAndLinkedTable}>
                <Filter
                    pageName='Device list'
                    showBackToButton={false}
                    showFilter={true}
                />
                {!isNaN(amountOfPages) && !isNaN(amountOfItems)?
                    <LinkedTable
                        filterData={filterData}
                        applyFilter={applyFilter}
                    />
                : ''}
            </Grid>
        </Grid>
    </Grid>
);

styles:

const ContainerStyle = {
    backgroundColor: '#f6f7f9',
    minHeight: 'calc(100vh - 112px)',   
}

const StyleTableContainer = {
    padding: '20px 10px 0px 30px',
    minWidth: '300px'
}

const StyleFilterAndLinkedTable = {
    padding: '0px 0px 0px 30px'
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You're almost there, you just need to set maxWidth for StyleTableContainer too. That would help you to limit the max width of the filter box element.

const StyleTableContainer = {
    padding: '20px 10px 0px 30px',
    minWidth: '300px',
    maxWidth: '300px',
}
about 4 years ago · Juan Pablo Isaza Denunciar
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