Skip to content

Commit 5705a31

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
Verify explicit empty select options and refresh caller guidance
1 parent 3556d0c commit 5705a31

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/select-field/select-value-editor.tsx‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ export function SelectValueEditor({
5555
}}
5656
options={options}
5757
showAllOption={false}
58-
// In multiple mode ChipSelect ignores `placeholder` and renders
59-
// `allLabel` when nothing is selected — which would read as if every
60-
// option were chosen. There is no "All" entry here, so this is the
61-
// empty label.
62-
allOptionLabel='Select options'
6358
align={align}
6459
fullWidth={fullWidth}
6560
dropdownWidth='content'

‎packages/emcn/src/components/chip-select/chip-select.dom.test.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,19 @@ describe('ChipSelect menu interactions', () => {
239239
aria-labelledby='status'
240240
showSelectedCheck
241241
dropdownWidth={280}
242-
value='ready'
242+
value=''
243243
options={[
244-
{ value: 'ready', label: <span>Ready</span>, iconElement: <span data-testid='avatar' /> },
244+
{ value: '', label: <span>None</span>, iconElement: <span data-testid='avatar' /> },
245245
]}
246246
/>
247247
)
248248
expect(ref.current).toBe(trigger)
249+
expect(trigger.textContent).toBe('None')
249250
expect(trigger.getAttribute('aria-labelledby')).toBe('status')
250251
await key(trigger, 'ArrowDown')
251252
expect(document.querySelector('[role="menu"]')?.getAttribute('style')).toContain('width: 280px')
252-
expect(menuItem('Ready').querySelector('[data-testid="avatar"]')).not.toBeNull()
253-
expect(menuItem('Ready').querySelector('svg')).not.toBeNull()
253+
expect(menuItem('None').querySelector('[data-testid="avatar"]')).not.toBeNull()
254+
expect(menuItem('None').querySelector('svg')).not.toBeNull()
254255
})
255256

256257
it('keeps an empty selection distinct from All when no reset row is offered', async () => {

0 commit comments

Comments
 (0)