Skip to content

Commit

Permalink
fix(Select): make null to showPlaceholder (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed May 13, 2024
1 parent 3f5e507 commit ac3a6da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/radix-vue/src/Select/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { isNullish } from '@/shared'

export const OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown']
export const SELECTION_KEYS = [' ', 'Enter']
export const CONTENT_MARGIN = 10

export function shouldShowPlaceholder(value?: string) {
return value === '' || value === undefined
return value === '' || isNullish(value)
}

0 comments on commit ac3a6da

Please sign in to comment.