Skip to content
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

Model table multiple select #209

Merged
merged 9 commits into from
Dec 23, 2016
Merged

Conversation

Mognom
Copy link
Contributor

@Mognom Mognom commented Jun 28, 2016

This is based upon #207

Refactored row selection to be done by the ModelTable instead of being done by the DataViewer widget.

Allows selection of multiple rows using the control and alt key modifiers to choose the selection behaviour.

Three types of selection behaviour:

  • Ignored: Selection is disabled.
  • Single: Only one row can be selected.
  • Multiple rows can be selected.

Added an event to send the current selection on change.

Requires the DataViewer widget changes done by wirecloud/data-viwer-widget#3 to work with it.

@@ -198,7 +198,7 @@
'initialSortColumn': -1,
'pageSize': 5,
'emptyMessage': utils.gettext('No data available'),
'allowMultipleSelect': false
'selectionType': "ignore"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore gives the impression that the selection is going to be ignored whereas this mode raises exceptions when trying to select rows (e.g. using the select method). I think that is better to rename this to none

{id: 1}
];
table.source.changeElements(data);
rows = table.wrapperElement.querySelectorAll(".se-model-table-row");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line as it isn't doing anything useful ;-)

@aarranz aarranz merged commit 12a4bcd into Wirecloud:develop Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants