We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selectedAccounts是个数组,在selectedAccounts改变时Group会重新绘制,但是在重绘时,上一次列表中的数据还保留在界面。期望是在Group重绘时,只显示这一次selectedAccounts中的数据。 是我的用法不对吗?
const [selectedAccounts, setSelectedAccounts] = React.useState<DataSource[]>(dataSource); const onSelectedAccountClose = (record: DataSource) => { const filteredArray = selectedAccounts.filter((a) => a.contentItemId != record.contentItemId); setSelectedAccounts(filteredArray); return true; }; <Group> {selectedAccounts.map((a) => ( <Closeable key={a.login} onClose={() => onSelectedAccountClose(a)}> {`${a.login}`} </Closeable> ))} </Group>
The text was updated successfully, but these errors were encountered:
貌似是到一定数量之后才会出现这个现象,我现在的是55个Closeable 元素
Sorry, something went wrong.
No branches or pull requests
selectedAccounts是个数组,在selectedAccounts改变时Group会重新绘制,但是在重绘时,上一次列表中的数据还保留在界面。期望是在Group重绘时,只显示这一次selectedAccounts中的数据。
是我的用法不对吗?
The text was updated successfully, but these errors were encountered: