Skip to content

Commit edeab36

Browse files
fix(select): Issue #71 - Prevent empty space in each field with no selection
Co-authored-by: Ilhan Yapici <[email protected]>
1 parent 1bfd015 commit edeab36

File tree

6 files changed

+1108
-376
lines changed

6 files changed

+1108
-376
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import { converter } from 'react-js-cron'
7979
const cronString = converter.getCronStringFromValues(
8080
'day', // period: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'reboot'
8181
[], // months: number[] | undefined
82-
[], // monthDays: number[] | undefined
82+
[], // monthDays: number[] | undefined
8383
[], // weekDays: number[] | undefined
8484
[2], // hours: number[] | undefined
8585
[1], // minutes: number[] | undefined

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060
},
6161
"resolutions": {
62-
"@ant-design/cssinjs": "1.0.2",
62+
"@ant-design/cssinjs": "1.23.0",
6363
"enhanced-resolve": "5.10.0"
6464
},
6565
"peerDependencies": {
@@ -68,7 +68,7 @@
6868
"react-dom": ">=17.0.0"
6969
},
7070
"devDependencies": {
71-
"@ant-design/icons": "4.8.0",
71+
"@ant-design/icons": "6.0.0",
7272
"@babel/core": "7.20.5",
7373
"@rollup/plugin-commonjs": "23.0.3",
7474
"@rollup/plugin-node-resolve": "15.0.1",
@@ -93,7 +93,7 @@
9393
"@types/react-dom": "18.0.9",
9494
"@typescript-eslint/eslint-plugin": "5.44.0",
9595
"@typescript-eslint/parser": "5.44.0",
96-
"antd": "5.9.4",
96+
"antd": "5.24.7",
9797
"babel-loader": "8.3.0",
9898
"cz-conventional-changelog": "3.3.0",
9999
"del-cli": "5.0.0",

src/styles.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ div.react-js-cron-select {
2020
.react-js-cron-select.react-js-cron-select-no-prefix {
2121
margin-left: 0;
2222
}
23+
.react-js-cron-select .ant-select-selection-wrap {
24+
position: relative;
25+
align-items: center;
26+
}
27+
/* Absolute position only when there are one child, meaning when no items are selected. */
28+
.react-js-cron-select
29+
.ant-select-selection-overflow:has(> :nth-child(-n + 1):last-child) {
30+
position: absolute;
31+
top: 0;
32+
left: 0;
33+
}
34+
/* Center placeholder vertically. */
35+
.react-js-cron-select .ant-select-selection-placeholder {
36+
margin-top: -2px;
37+
}
2338
div.react-js-cron-error .react-js-cron-select .ant-select-selector {
2439
border-color: #ff4d4f;
2540
background: #fff6f6;

0 commit comments

Comments
 (0)