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

Table: add disabled state to multiple selection header checkbox #9543

Merged
merged 1 commit into from Jan 30, 2018

Conversation

Leopoldthecoder
Copy link
Contributor

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@Leopoldthecoder Leopoldthecoder merged commit ba284c7 into ElemeFE:dev Jan 30, 2018
mu-yu pushed a commit to mu-yu/element that referenced this pull request Jan 30, 2018
@@ -34,6 +34,7 @@ const forced = {
selection: {
renderHeader: function(h, { store }) {
return <el-checkbox
disabled={ store.states.data && store.states.data.length === 0 }
Copy link
Contributor

Choose a reason for hiding this comment

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

@Leopoldthecoder
Should filteredData be referenced instead of data in case there are some column filters applied and the table does not have any visible rows but still has some data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

data is already filtered. The difference between data and filteredData is that data is sorted (if the table can be sorted). The original data is stored in _data.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, okay.

bluejfox added a commit to setariajs/setaria-ui that referenced this pull request Feb 7, 2018
Merge commit '3267f8f244887d243f1bc35099a40134fc059574' into current

* commit '3267f8f244887d243f1bc35099a40134fc059574': (592 commits)
  [release] 2.1.0
  [build] 2.1.0
  Changelog: update for 2.1.0 (ElemeFE#9581)
  Popover: v-popover directive supports expression (ElemeFE#9564)
  Update icon.scss (ElemeFE#9534)
  Doc: add sponsors (ElemeFE#9578)
  DatePicker: fix date clamping during navigation (ElemeFE#9577)
  Table: extend height prop usage (ElemeFE#9575)
  Dropdown: remove transition delay when trigger is click (ElemeFE#9573)
  Update README.md
  Collapse: fix nested collapse-item style (ElemeFE#9566)
  Table: improve performance (ElemeFE#9426)
  Table: change argument selection to cloned array in selection-change event (ElemeFE#9551)
  Table: fix expand row hover style (ElemeFE#9554)
  Notification: add position definition for ElNotificationOptions (ElemeFE#9546)
  Table: add disabled state to multiple selection header checkbox (ElemeFE#9543)
  Table: add indeterminate state to multiple selection header checkbox (ElemeFE#9363)
  Pagination: add keyup event to jumper so it works in IE11 (ElemeFE#9538)
  Input: fix appended button style in IE11 (ElemeFE#9537)
  Docs: fix Dialog doc's typo (ElemeFE#9533)
  ...

# Conflicts:
#	.gitignore
#	CHANGELOG.zh-CN.md
#	README.md
#	build/bin/version.js
#	build/deploy-ci.sh
#	components.json
#	examples/components/footer-nav.vue
#	examples/components/side-nav.vue
#	examples/docs/en-US/button.md
#	examples/docs/zh-CN/button.md
#	examples/docs/zh-CN/custom-theme.md
#	examples/docs/zh-CN/datetime-picker.md
#	examples/docs/zh-CN/dialog.md
#	examples/docs/zh-CN/form.md
#	examples/docs/zh-CN/loading.md
#	examples/docs/zh-CN/quickstart.md
#	examples/docs/zh-CN/radio.md
#	examples/docs/zh-CN/tabs.md
#	examples/docs/zh-CN/time-picker.md
#	examples/docs/zh-CN/transition.md
#	examples/docs/zh-CN/upload.md
#	examples/versions.json
#	package.json
#	packages/autocomplete/src/autocomplete.vue
#	packages/cascader/src/menu.vue
#	packages/collapse/src/collapse-item.vue
#	packages/color-picker/src/components/picker-dropdown.vue
#	packages/date-picker/src/basic/date-table.vue
#	packages/date-picker/src/basic/month-table.vue
#	packages/date-picker/src/basic/time-spinner.vue
#	packages/date-picker/src/basic/year-table.vue
#	packages/date-picker/src/panel/date-range.vue
#	packages/date-picker/src/panel/date.vue
#	packages/date-picker/src/panel/time-range.vue
#	packages/date-picker/src/panel/time.vue
#	packages/date-picker/src/picker.vue
#	packages/dialog/src/component.vue
#	packages/dropdown/src/dropdown.vue
#	packages/form/src/form-item.vue
#	packages/form/src/form.vue
#	packages/input-number/src/input-number.vue
#	packages/input/src/input.vue
#	packages/loading/src/directive.js
#	packages/loading/src/index.js
#	packages/menu/src/menu-item.vue
#	packages/menu/src/menu.vue
#	packages/menu/src/submenu.vue
#	packages/message-box/src/main.vue
#	packages/message/src/main.js
#	packages/notification/src/main.js
#	packages/pagination/src/pagination.js
#	packages/popover/src/main.vue
#	packages/radio/src/radio-button.vue
#	packages/radio/src/radio.vue
#	packages/rate/src/main.vue
#	packages/select/src/select.vue
#	packages/table/src/table-column.js
#	packages/table/src/table-layout.js
#	packages/table/src/table.vue
#	packages/tabs/src/tabs.vue
#	packages/theme-default/src/dialog.css
#	packages/theme-default/src/index.css
#	packages/tooltip/src/main.js
#	packages/transfer/src/transfer-panel.vue
#	packages/tree/src/tree.vue
#	packages/upload/src/index.vue
#	packages/upload/src/upload.vue
#	src/index.js
#	yarn.lock
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.

None yet

2 participants