249 Commits

Author SHA1 Message Date
dopamine
6bf6313f35 fix(components): [table] render default slot only when it returns valid vnodes (#21651) 2025-08-06 14:39:10 +02:00
An Hao
9bd2f8a4f5 feat(components): [table] support native scrollbar (#21539)
* feat(components): [table] support native scrollbar

* Update table.vue

* Update packages/components/table/src/table/defaults.ts

Co-authored-by: btea <2356281422@qq.com>

---------

Co-authored-by: anhao <wzanh@sinopec.com>
Co-authored-by: btea <2356281422@qq.com>
2025-07-30 11:11:42 +08:00
Zhong
1bf92d6146 fix(components): [table] avoid width calculation errors caused by hidden (#21492) 2025-07-25 10:20:05 +08:00
btea
865ce3849e fix(components): [table] revert 20210 (#21482)
* fix(components): [table] revert 20210

* chore: update

* test: check indent
2025-07-24 20:04:31 +08:00
Zhong
bc9a95d9ba chore(components): fix typos (#21473) 2025-07-23 07:09:15 +08:00
Mamaev Iurii
4bb8d8ce04 fix(components): [table] fix absence of theadRef bug (#21454)
fix(components): [TableHeader] fix absence of theadRef bug
2025-07-22 08:13:53 +08:00
Zhong
58a5852d2d refactor(components): improve component boolean type (#21260) 2025-07-06 14:56:17 +02:00
Noblet Ouways
164a8a5ee5 refactor(components): [table] remove @ts-nocheck (#21200)
* refactor(components): [table] remove `@ts-nocheck`

* chore: remove any wip

* chore: better types
2025-07-02 11:28:11 +08:00
Noblet Ouways
c5d37fbb0a refactor(components): [table] remove @ts-nocheck (#21197)
refactor(components): [table] remove `@ts-nocheck` 2/3
2025-07-01 15:49:54 +08:00
Noblet Ouways
e3373b36e8 refactor(components): [table] remove @ts-nocheck (#21139)
* refactor(components): [table] remove `@ts-nocheck`

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>

* fixup! refactor(components): [table] remove `@ts-nocheck`

Co-authored-by: btea <2356281422@qq.com>

* fixup! refactor(components): [table] remove `@ts-nocheck`

Co-authored-by: btea <2356281422@qq.com>

* chore: revert type

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/index.ts

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>

---------

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
Co-authored-by: btea <2356281422@qq.com>
2025-06-30 23:41:36 +08:00
btea
7a499bf40f refactor(components): [table] compatible with rowKey non-existence (#21134)
* refactor(components): [table] compatible with rowKey non-existence

* chore: update

* fix: update
2025-06-25 16:39:32 +02:00
Spaceman
b3219f6446 fix(components): [table] fix the issue where the expand-row-keys property does not support the number type (#20210)
* fix(components): [table] fix the bug of the expand-row-keys property

* fix(components): [table] fix the bug of the expand-row-keys property

Fix the issue where the expand-row-keys property does not support the number type

* fix(components): [table] fix the bug of the expand-row-keys property

Fix the issue where the expand-row-keys property does not support the number type

* fix(components): [table] Use Map instead of Object to handle number keys

 Use Map instead of Object to solve the problem of number keys

* fix(components): [table] fix the bug of the expand-row-keys property

1.expandRowKeys should be of type Array<string | number> ✔
2.It would be better to add types to new Map() ✔
3.It would be better to add relevant test cases ✔

* fix(components): [table] fix the bug of the expand-row-keys property

1. expandRowKeys should be of type Array<string | number> ✔
2. It would be better to add types to new Map() ✔
3. It would be better to add relevant test cases ✔

* fix(components): [table] fix the bug of the expand-row-keys property

1. expandRowKeys should be of type Array<string | number> ✔
2. It would be better to add types to new Map() ✔
3. It would be better to add relevant test cases ✔

* fix(components): [table] fix the bug of the expand-row-keys property

1.table.md ✔
2.add a test for mixed strings and numbers ✔

* fix(components): [table] fix the bug of the expand-row-keys property

1.table.md ✔
2.add a test for mixed strings and numbers ✔

* fix(components): [table] fix the bug of the expand-row-keys property

1. table-test-common.ts ✔
2. table.md ✔
3. tree.ts -- changed to: new Map<string | number, object>() ✔

* fix(components): [table] fix the bug of the expand-row-keys property

fix(components): [table] fix the bug of the expand-row-keys property

* fix(components): [table] fix the bug of the expand-row-keys property

fix(components): [table] fix the bug of the expand-row-keys property

* fix(components): [table] fix the bug of the expand-row-keys property

fix(components): [table] fix the bug of the expand-row-keys property

* fix(components): [table] fix packages/components/table/src/store/tree.ts

fix(components): [table] fix packages/components/table/src/store/tree.ts

* chore: update test cases

* chore: update version

* fix(components): [table] fix the bug of the expand-row-keys property

Fix the issue where the expand-row-keys property does not support the number type

---------

Co-authored-by: warmthsea <2586244885@qq.com>
2025-06-25 22:02:43 +08:00
Ethan Yin
23c680f810 perf(components): [table] remove redundant updateSelectionByRowKey (#21092)
* perf(components): [table] remove redundant `updateSelectionByRowKey`

* revert(components): [table] revert `assertRowKey`
2025-06-23 01:00:08 +02:00
betavs
947a88d255 fix(components): [table] render tree node (#19247) 2025-06-20 20:36:56 +08:00
xiaohe0601
5cee7a1464 fix(components): [table] fix children can't be unchecked (#20995)
* fix(components): [table] fix children can't be unchecked

* test(components): [table] reserve selection
2025-06-20 10:01:20 +08:00
Noblet Ouways
2f17df1209 style(eslint-config): newline before import type (#21036)
* perf: change to import-x

* feat: add rules

* chore: fix rule

* chore: fix

* chore: fix

* chore: fix

* style: `pnpm lint:fix`

* Revert "style: `pnpm lint:fix`"

This reverts commit db0116a288.

* Revert "chore: fix"

This reverts commit 69c82a90c0.

* chore: fix

* style: `pnpm lint:fix`

* fix: lint

* chore: `pnpm format`
2025-06-16 15:37:12 +08:00
btea
6d72d09043 fix(components): [table] tooltip compatibility edge case (#21012) 2025-06-13 17:55:12 +02:00
Meet you
b44a4a3acf feat(components): [table-column] add expand slot (#20750)
* feat(components): [table-column] add `expand` slot

* fix(components): update

* Update packages/components/table/src/table-column/render-helper.ts

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

* fix(docs): update

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
2025-05-31 09:33:40 +02:00
sea
556fbbc699 Revert "table expand #20587 #20715 #20811" (#20834)
* Revert "table expand  #20587 #20715 #20811"

* chore: revert
2025-05-23 18:03:59 +08:00
sea
040520dddf fix(components): [table] update expand-row-keys invalid (#20811) 2025-05-22 09:13:39 +08:00
q
53b7a31520 fix(components): [table] the selection column cannot be displayed when it is not in the first row (#20582)
* fix(components): [table] el-table里table-column的fixed问题 #20558

* fix(components): [table] 修复如果selection没有fixed属性时,会一直出现在末尾的bug #20558

* fix(components): [table] 删除test案例读取到left为0时修改fixed属性 #20558

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* Update packages/components/table/src/store/watcher.ts

Co-authored-by: btea <2356281422@qq.com>

* fix(components): [table] 还原table-column.test.ts测试用例&格式化watcher.ts代码

* fix: [table] -增加左侧/右侧固定列筛选selection逻辑

* fix: [table] -table-column.test.ts测试用例修改

* fix: [table] - 还原测试用例,修改watcher.ts,使其兼容如果有固定列并且select为第一列的情况

* fix: update & test

* fix: update

---------

Co-authored-by: 卿鹏 <qp66797@gmail.com>
Co-authored-by: btea <2356281422@qq.com>
2025-05-20 10:28:25 +08:00
btea
317307aa2a fix(components): [table] default-expand-all invalid (#20715)
* fix(components): [table] `default-expand-all` invalid

* test: dynamic data case

* test: update
2025-05-13 16:49:17 +08:00
Nick Wu
154f7b0f8e fix(components): [table] shrinked table expanded when modify data (#20587)
* fix(components): [table] shrinked  table expanded when modify data

* fix(components): [table] type check error

* fix(components): [table] update test case
2025-05-01 16:49:07 +08:00
betavs
5f519a6f25 refactor(components): unify append-to prop type across multiple components (#20501)
* fix(components): [select] update `append-to` prop type

* fix(components): unify `append-to` prop type across multiple components

* docs: update `append-to` prop type
2025-04-22 09:29:19 +08:00
comp-squirrel
1ee7fa7e7d fix(components): [table] prevent child node selection loss during table data modification (#20322)
* fix(components): [table] child selection loss during data modification

* refactor: replace logical AND (&&) with explicit if statement

* test: use unique id
2025-04-09 17:14:55 +08:00
sea
1084071fcf chore(eslint-config): add newline-after-import rules (#20309)
chore: add `newline-after-import` rules
2025-03-31 20:48:10 +08:00
pengpeng
e9d82e59e9 fix(components): [table] the selection column conflicts with setting both showOverflowTooltip and align='center' styles (#20157)
* fix(components): [table] type sets showOverflowTooltip centering style problem under `selection`

* Update index.ts

* Update index.ts
2025-03-18 10:30:46 +08:00
dopamine
7be4a3765e chore: emits smaller declaration files (#20109)
* Revert "fix(types): packing unexpected types (#19419)"

This reverts commit 13506ffb81.

* Revert "chore: add explicit type annoation (#19352)"

* fix(typescript): borken import paths in declaration files

* chore: emits smaller declaration files
2025-03-18 10:08:44 +08:00
EralChen
d410486c07 feat(components): [table-column] preserve expanded content (#19899)
* feat: [table-column] preserve expanded content

* chore: format

---------

Co-authored-by: warmthsea <2586244885@qq.com>
2025-03-13 10:20:07 +08:00
Jason
3079a4789d fix(components): [table] replace pageX with clientX (#19881)
Co-authored-by: chengang <chengang@lianantech.com>
2025-02-27 22:21:53 +08:00
Delyan Haralanov
2b7b566d17 fix(components): [table] compatible with window non-existence (#19837)
ElTable's doLayout method is debounced and scheduled (relying on setTimeout) which causes problems in testing(Vitest). Sometimes the testing environment(jsdom) is destroyed before doLayout() executes which causes error due to requestAnimationFrame not existing.
To mitigate this issue can check if the window exists which is a good indication that jsdom has not been thorn down yet.
2025-02-14 21:36:41 +08:00
pengpeng
d2e269f772 fix(components): [table] the toggleTreeExpansion failed to trigger load function (#18728)
* feat(components): [table] fix lazy loading

* Modify the function usage
2025-01-26 15:21:56 +08:00
Nick Wu
b009be7c17 fix(components): [table] fix the logic of selection column when fixed state changes dynamically (#19703)
* fix(components): [table] selection column fixed left

* fix(components): [table] optimize function

* fix(components): [table] add dynamic columns test case
2025-01-25 07:52:47 +08:00
知晓同丶
462bff18de feat(components): [table] add tooltip-formatter table & table-column prop (#19524)
* feat(components): [table] add `tooltip-formatter` table-column prop

closed #19507

* docs: add example

* docs: demo remove tooltip formatter index

* refactor(components): refactor code

* docs: simpify tooltip demo

* fix: fix warning error

* feat(components): add table tooltip-formatter prop & merge slot

* refactor: reuse variables

* test: add tooltip-formatter test

* docs: upgrade version

* feat(components): [table] add `tooltip-formatter` table-column prop

closed #19507

* docs: add example

* docs: demo remove tooltip formatter index

* refactor(components): refactor code

* docs: simpify tooltip demo

* fix: fix warning error

* feat(components): add table tooltip-formatter prop & merge slot

* refactor: reuse variables

* test: add tooltip-formatter test

* docs: upgrade version

* refactor: change parameter to obj args

* fix: property change to prop

* fix: export `TableOverflowTooltipFormatterData`

* refactor: `TableOverflowTooltipFormatterData` to `TableTooltipData`

* fix: remove useless import

* fix: refactor code

---------

Co-authored-by: btea <2356281422@qq.com>
2025-01-23 20:15:12 +08:00
伊墨
f980addfe3 fix(components): [table] The index parameter of the selectable function is undefined (#19587)
* fix(components): [table] first record can not be checked

* fix(components): [table] last commit doesnt work for others index

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

* test(components): [table] add test cases

* test(components): [table] modify the test case of the last submission

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
Co-authored-by: btea <2356281422@qq.com>
2025-01-21 15:58:59 +08:00
Nick Wu
fc1a0b8d60 fix(components): [table] selection-change event emit incorrectly (#19618)
* feat(components): [table] fix 'selection-change' event emit incorrectly

* fix(components): [table] add test case
2025-01-18 18:36:06 +08:00
Noblet Ouways
6c5cfbfce6 fix(components): [table-footer] update cols width on layout change (#19064)
fix(components): [table-footer]

update cols width on layout change

closed #19054

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
2025-01-16 17:12:23 +08:00
xingyixiang
971d422e8b test: [table] add show-overflow-tooltip trigger (#19556)
* test: [table] add show-overflow-tooltip trigger

* test: [table] add show-overflow-tooltip trigger
2025-01-09 17:36:59 +08:00
btea
f3fec3203a feat(components): [table] add allow-drag-last-column prop (#19374) 2025-01-03 11:36:19 +08:00
qiang
a03812db54 perf(components): [table] prioritize use rowKey to determine whether it is selected (#19451)
* perf(components): [table] use rowKey to determine whether it is selected

* chore: revert includes

* perf: use includes replace isEqual
2025-01-03 08:14:00 +08:00
xingyixiang
7d76dea667 fix(components): [table] the overflowTooltip cannot be refreshed (#19440)
fix(components): [table] the tooltip cannot be refreshed
2024-12-29 10:15:02 +08:00
jiaxiang
a0a518718b chore: [table] optimization type check (#19280)
* chore: [table] optimization type check

* feat: null

* chore: isNil

* fix: import
2024-12-21 15:10:12 +08:00
btea
a2f43777c3 fix(components): [table] fixed column style when lazyload title (#19020) 2024-11-27 10:26:10 +08:00
blesstosam
f1e95dc3a9 feat(components): [table] expose scroll event (#12524)
* feat(components): [table] expose scroll event

* chore: update doc
2024-11-20 21:49:22 +08:00
betavs
f0f578d713 fix(components): [table] repeat setting the height style (#16054) 2024-11-15 09:30:51 +08:00
xingyixiang
ffb30818cf fix(components): [table] failed to insert tooltip when show-overflow-tooltip is enabled (#18317)
* fix:The namespace of the showOverflowTooltip is invalid.

* fix(components): [scrollbar] multiple rendering

* fix(components): [scrollbar] multiple rendering

* fix(components): [scrollbar] multiple rendering

* Update packages/components/scrollbar/src/bar.vue

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>

* test(components): [scrollbar] adjusting style attributes

* fix(components): [table] Failed to insert node when show-overflow-tooltip is enabled

* fix(components): [table] Failed to insert node when show-overflow-tooltip is enabled

* fix(components): [table] Failed to insert node when show-overflow-tooltip is enabled

* fix(components): [table] Failed to insert node when show-overflow-tooltip is enabled

---------

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
2024-11-10 16:02:34 +08:00
btea
c0f071e464 fix(components): [table] table-layout:auto fixed column misalignment (#18736)
* fix(components): [table] `table-layout:auto` fixed column misalignment

* fix: update

* fix: update

* fix: update

* Update packages/components/table/src/table-header/index.ts

Co-authored-by: qiang <qw13131wang@gmail.com>

* Update packages/components/table/src/table-header/index.ts

Co-authored-by: qiang <qw13131wang@gmail.com>

* fix: lint

---------

Co-authored-by: qiang <qw13131wang@gmail.com>
2024-11-10 14:39:45 +08:00
jiaxiang
dab6b73040 refactor: replace type checking with built-in functions (#18720)
* refactor: replace typeof string with the built-in isString

* refactor: replace typeof boolean with the built-in isBoolean

* refactor: replace typeof undefined with the built-in isUndefined

* chore: style

* chore: style
2024-10-31 09:21:21 +08:00
jiaxiang
eb899f0702 refactor: replace typeof number with the built-in isNumber (#18706)
* refactor: replace typeof number with the built-in isNumber

* style: format
2024-10-30 14:54:49 +08:00
jiaxiang
36bd70670e refactor: replace typeof fn with the built-in isFunction (#18705) 2024-10-30 08:42:04 +08:00