-
-
Notifications
You must be signed in to change notification settings - Fork 50.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Allow user to configure the Tooltip in the Table header (#29002) * feat: Table header supports tooltipPlacement * docs: add Table tooltipPlacement * feat: Allow user to configure the Tooltip in the Table header * fix: fix jsx and use old code style * fix: replace if blocks with ternary operator * docs: fix url Co-authored-by: 偏右 <afc163@gmail.com> * docs: fix url Co-authored-by: harrisoff <john@smith.kyon> Co-authored-by: 偏右 <afc163@gmail.com> * fix: Row with gutter has additional gap (#29059) * chore: init gutter * feat: col support gap * chore: Update playground * fix: Safari padding * test: fix test case * test: More test case * docs: Update demo * test: Update coverage * test: Update test hack * feat(input-number): add keyboard prop to support disable keyboard (#29110) Co-authored-by: Ant Design GitHub Bot <yesmeck+ant-design-bot@gmail.com> Co-authored-by: Harrison <stlebea@foxmail.com> Co-authored-by: harrisoff <john@smith.kyon> Co-authored-by: 偏右 <afc163@gmail.com> Co-authored-by: 二货机器人 <smith3816@gmail.com> Co-authored-by: Kermit <kermitlx@outlook.com>
- Loading branch information
1 parent
be08d23
commit 40f9be9
Showing
22 changed files
with
375 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
import { Col, Row } from '..'; | ||
// eslint-disable-next-line no-unused-vars | ||
import * as styleChecker from '../../_util/styleChecker'; | ||
|
||
jest.mock('../../_util/styleChecker', () => ({ | ||
canUseDocElement: () => true, | ||
isStyleSupport: () => true, | ||
isFlexGapSupported: true, | ||
})); | ||
|
||
describe('Grid.Gap', () => { | ||
it('should use gap', () => { | ||
const wrapper = mount( | ||
<Row gutter={[16, 8]}> | ||
<Col /> | ||
</Row>, | ||
); | ||
|
||
expect(wrapper.find('.ant-row').props().style).toEqual( | ||
expect.objectContaining({ | ||
'--column-gap': '16px', | ||
'--row-gap': '8px', | ||
}), | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
// eslint-disable-next-line no-unused-vars | ||
import canUseDom from 'rc-util/lib/Dom/canUseDom'; | ||
import { Col, Row } from '..'; | ||
|
||
jest.mock('rc-util/lib/Dom/canUseDom', () => () => false); | ||
|
||
describe('Grid.Server', () => { | ||
it('use compatible gap logic', () => { | ||
const wrapper = mount( | ||
<Row gutter={[8, 16]}> | ||
<Col /> | ||
</Row>, | ||
); | ||
|
||
expect(wrapper.find('.ant-row').props().style).toEqual( | ||
expect.objectContaining({ | ||
marginLeft: -4, | ||
marginRight: -4, | ||
marginTop: -8, | ||
marginBottom: -8, | ||
}), | ||
); | ||
|
||
expect(wrapper.find('.ant-col').props().style).toEqual( | ||
expect.objectContaining({ | ||
paddingLeft: 4, | ||
paddingRight: 4, | ||
paddingTop: 8, | ||
paddingBottom: 8, | ||
}), | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.