timelessco / chakra-components

Components built on top of Chakra UI
MIT License
1 stars 0 forks source link

[Bug/Feature Tracker] ComboBox #59

Closed prasanna1211 closed 4 years ago

prasanna1211 commented 4 years ago

As per #52 , needs following features

General behaviours

Async component

Multiple Select

Custom Option

Rewrite Composition

<ComboBox
  value={fruit}
  options={options}
  onChange={() => {}}
>
  <ComboBoxInputGroup>
    <ComboBoxRightElement
      children={<Icon name="chevron-down" fontSize="1.5rem" />}
    />
    <ComboBoxClearElement />
  </ComboBoxInputGroup>

  <ComboBoxList
    renderItem={() => (
      <Box>
        // control for options
      </Box>
    )}
  />
prasanna1211 commented 4 years ago

Adding a set of issues here.

First one being, I think list box shouldn't have close button.

image

prasanna1211 commented 4 years ago

For pointer hover, cursor should be pointer for close button right ?

navin-moorthy commented 4 years ago

Adding a set of issues here.

First one being, I think list box shouldn't have close button.

image

As per the standard there is no close button for combo-box, it's part of UX I guess. May we can make it hide with props if they don't want or by default it will be hidden and can have it with props

prasanna1211 commented 4 years ago

When the value is not a valid option's value, the component shouldn't break. Instead no option should be selected.

image

prasanna1211 commented 4 years ago

Not a bug: A little confusion in behaviour of listbox. When we type then, choose the dropdown closes. If we type when it is still focused, the value changes. This happens in native select box too. But never seen it in the accessibility docs.

prasanna1211 commented 4 years ago

In async while we type, pressing enter clears the text. Intended ?

prasanna1211 commented 4 years ago

There are a few open source standards that we generally do, even at times when certain things are obvious to avoid breaking the code. These are done generally when typescript is not used.

  1. Type check once, for every function by typeof x == 'function'. Example, this shouldn't be an error. Instead a default filter function should load. image

  2. Same way for all functions. I could see this being there in the source at few places. Should extend it everywhere.

prasanna1211 commented 4 years ago

I think Pressing space bar when the input is empty needs a different behaviour. Currently it treats as a space which generally not used to be the case. react select, selects the first option when the dropdown is open and the space bar is pressed.

navin-moorthy commented 4 years ago

Closing this in favour of now individual issues being created.