Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterteasweetorange committed Jan 15, 2024
1 parent 0e6dcaa commit 112a1b5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master

jobs:
deploy:
depoly:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -35,12 +35,12 @@ jobs:
run: pnpm install

- name: Install Playwright Browsers
- npx playwright install --with-deps
run: npx playwright install --with-deps

- name: Test
run: pnpm test
- uses actions/upload-artifact@v3

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mui-easy-cascader",
"version": "0.3.6",
"version": "0.4.0",
"main": "dist/index.js",
"module": "dist/index.es.js",
"types": "dist/src/index.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions src/EasyCascader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { EasyCascaderBaseNode, EasyCascaderProps, EasyId } from '../types'
export const EasyCascader = forwardRef(EasyCascaderRaw) as <
T extends EasyCascaderBaseNode,
>(
props: EasyCascaderProps<T>,
ref?: ForwardedRef<EasyKeyboardRefObject<T>>,
props: EasyCascaderProps<T> & {
ref?: ForwardedRef<EasyKeyboardRefObject<T>>
},
) => JSX.Element

export function EasyCascaderRaw<T extends EasyCascaderBaseNode>(
function EasyCascaderRaw<T extends EasyCascaderBaseNode>(
props: EasyCascaderProps<T>,
ref?: ForwardedRef<EasyKeyboardRefObject<T>>,
) {
Expand Down
7 changes: 2 additions & 5 deletions src/EasyCascaderInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ export function EasyCascaderInput<OptionT extends EasyCascaderBaseNode>(
setSelectedId(id)
setHoverId(id)
if (isLeaf) {
setFocused(false)

onChange(node)
setFocused(false)
setIsSearch(false)
setSearch('')
} else {
setSelectedId(id)
}
setSearch('')
}
const [hoverId, setHoverId] = useState<EasyId | null>(defaultSelectedId)

Expand Down
7 changes: 6 additions & 1 deletion src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const mockObjectNodes: MockObject[] = [
id: 1,
name: 'children-0',
pathId: [0],
childrenId: [],
childrenId: [5],
},
{
id: 2,
Expand All @@ -33,4 +33,9 @@ export const mockObjectNodes: MockObject[] = [
id: 3,
name: 'parent-1',
},
{
id: 5,
name: 'leaf',
pathId: [0, 1],
},
]

0 comments on commit 112a1b5

Please sign in to comment.