From 5feaeabafd4491b5124e64b1f016e028d4a8de44 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 29 Aug 2023 12:03:18 +0800 Subject: [PATCH 1/2] fix: Rate should support id for scrollToFirstError --- src/Rate.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Rate.tsx b/src/Rate.tsx index c2492ae..92418a7 100644 --- a/src/Rate.tsx +++ b/src/Rate.tsx @@ -8,7 +8,8 @@ import type { StarProps } from './Star'; function noop() {} -export interface RateProps extends Pick { +export interface RateProps + extends Pick { value?: number; defaultValue?: number; allowClear?: boolean; @@ -17,6 +18,7 @@ export interface RateProps extends Pick void; onHoverChange?: (value: number) => void; className?: string; + id?: string; tabIndex?: number; onFocus?: () => void; onBlur?: () => void; @@ -131,7 +133,7 @@ class Rate extends React.Component { } }; - onKeyDown: React.KeyboardEventHandler = event => { + onKeyDown: React.KeyboardEventHandler = (event) => { const { keyCode } = event; const { count, allowHalf, onKeyDown, direction } = this.props; const reverse = direction === 'rtl'; @@ -242,6 +244,7 @@ class Rate extends React.Component { count, allowHalf, style, + id, prefixCls, disabled, className, @@ -279,6 +282,7 @@ class Rate extends React.Component {
    Date: Tue, 29 Aug 2023 12:04:36 +0800 Subject: [PATCH 2/2] chore: allow publish in branch 2.9.x --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee29b0e..20c7791 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "docs:build": "dumi build", "docs:deploy": "gh-pages -d .doc", "compile": "father build && lessc assets/index.less assets/index.css", - "prepublishOnly": "npm run compile && np --yolo --no-publish", + "prepublishOnly": "npm run compile && np --yolo --no-publish --branch 2.9.x", "postpublish": "npm run gh-pages", "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",