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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
See demo: https://codesandbox.io/s/blissful-fog-ixhix
Note: Maybe antd's limitations.
The text was updated successfully, but these errors were encountered:
Here is a temporary solution:
import { ListLifeCycleTypes } from '@alist/antd'; export default ($, actions) => { console.log($, actions); let crossPaginationSelectedRecords = new Set(); $(ListLifeCycleTypes.ON_LIST_MOUNTED).subscribe((payload) => { // enable selection feature actions.setRowSelection({ ids: [2] }); }); $(ListLifeCycleTypes.ON_LIST_SELECT_CHANGE).subscribe((payload) => { console.log("ON_LIST_SELECT_CHANGE", payload); try { // remove current page's record actions.getDataSource().map(t => t.id).forEach(item => { crossPaginationSelectedRecords.delete(item); }); // add current page's payload payload.ids.forEach(id => crossPaginationSelectedRecords.add(id)); console.log('crossPaginationSelectedRecords => ', crossPaginationSelectedRecords) } catch(err) { console.log(err); } }); // https://github.com/alibaba/alist/issues/44 $(ListLifeCycleTypes.WILL_LIST_UPDATE).subscribe(() => { // manually set actions.crossPaginationSelectedRecords = crossPaginationSelectedRecords; actions.setRowSelection({ ids: Array.from(crossPaginationSelectedRecords) }); console.log('WILL_LIST_UPDATE', actions.getRowSelection().records.map(t => t.id), crossPaginationSelectedRecords); }); };
Sorry, something went wrong.
No branches or pull requests
See demo: https://codesandbox.io/s/blissful-fog-ixhix
Note: Maybe antd's limitations.
The text was updated successfully, but these errors were encountered: