-
Notifications
You must be signed in to change notification settings - Fork 62
[WC-3162] DG: Add auto-select first row #1965
New issue
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
base: main
Are you sure you want to change the base?
Conversation
8fba284 to
6bdd659
Compare
iobuhov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might block select all feature. Let's merge it first
iobuhov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Rebase to
iobuhov_next - Add
autoSelectprop toDatagrid.config - Add
autoSelectprop tocreateSelectionHelper.tsfromwidget plugin grid - Add this code between lines 61-62 in
createSelectionHelper
if (helper.type === "Single" && config.autoSelect) {
const dispose = autorun(() => {
const firstItem = gate.props.datasource.items?.[0];
if (!firstItem) return;
helper.reduceTo(firstItem);
dispose();
});
add(dispose);
}6bdd659 to
4301865
Compare
a3cdb63 to
597fd6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add more XML props than it should. Remove all extra props.
Also, remove changes you made selection/helpers.ts
Pull request type
New feature (non-breaking change which adds functionality)
Description
What should be covered while testing?