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

56
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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