2

I would like to update the list by pulling down, but I didn't quite understand how this method works.

How do I implement it?

<InfiniteScroll
        style={{ padding: '0 1rem 5rem 0rem', display: 'flex', flexDirection: 'column', gap: '1rem', userSelect: 'none' }}
        height='85vh'
        next={fetchData}
        dataLength={dataLength}
        hasMore={isPaginationEnd}
        refreshFunction={fetchData}
        pullDownToRefresh={true}
        pullDownToRefreshThreshold={50}
        pullDownToRefreshContent={<MessageComponent text='Puxe para baixo p/ atualizar' />}
        releaseToRefreshContent={<LoadingComponent />}
        loader={<LoadingComponent />}
    >
        {!hasData ? (
            <MessageContainer text='Você não possui nenhuma cotação solicitada, vamos criar uma nova?... ;)' />
        ) : (
            data.map(({ informations, parameters }) => (
                <QuotationAccordion key={informations.rfqId} informations={informations} parameters={parameters} />
            ))
        )}
    </InfiniteScroll>
THIAGO DE BONIS
  • 760
  • 7
  • 22

0 Answers0