Skip to content

Commit

Permalink
fix(rac): Aria Selected Value issues
Browse files Browse the repository at this point in the history
Change-Id: Ieffe6e9df00706c2bc15e7853071c7b2bd7ab392
GitOrigin-RevId: 3df789cd2acc86b815833e4547ccaf6f973b97f0
  • Loading branch information
sarahsga authored and actions-user committed Nov 8, 2024
1 parent 0311e78 commit ddedad4
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions plasmicpkgs/react-aria/src/registerSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,12 @@ export interface BaseSelectValueProps
}

export const BaseSelectValue = (props: BaseSelectValueProps) => {
const { children, customize } = props;
const { children, customize, className } = props;
const placeholder = customize ? children : "Select an item";
return (
<SelectValue>
<SelectValue className={className}>
{({ isPlaceholder, selectedText }) => (
<>
{isPlaceholder ? (
<span>Select an item</span>
) : (
<>
<span>
{customize ? (children as React.ReactNode) : selectedText}
</span>
</>
)}
{}
</>
<>{isPlaceholder ? placeholder : selectedText}</>
)}
</SelectValue>
);
Expand Down Expand Up @@ -145,15 +135,6 @@ export function registerSelect(loader?: Registerable) {
],
hidden: (props) => !props.customize,
},
className: {
type: "class",
selectors: [
{
selector: ":self[data-placeholder]",
label: "Placeholder",
},
],
},
},
trapsFocus: true,
});
Expand Down

0 comments on commit ddedad4

Please sign in to comment.