siemens / ix

Siemens Industrial Experience is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.
https://ix.siemens.io/
MIT License
198 stars 67 forks source link

Can't disable user input in IX Select and IX Category Filter #1012

Closed ahmedibrahim92 closed 8 months ago

ahmedibrahim92 commented 10 months ago

Suggestion / feature request

As I developer, sometimes I need the user to use only the values that I provided in the IX Select and IX Category Filter so I need to disable user inputs, but I can't disable them.

nuke-ellington commented 10 months ago

Hi @ahmedibrahim92, thank you for reaching out. It is not entirely clear what your exact requirement looks like. Please provide more details. Maybe what you are looking for is the ix-dropdown component?

ahmedibrahim92 commented 10 months ago

Hi @ahmedibrahim92, thank you for reaching out. It is not entirely clear what your exact requirement looks like. Please provide more details. Maybe what you are looking for is the ix-dropdown component?

The main idea is that, using IX Category filter allows the user to enter any value that he needs so simply I can create a category filter for instance to filter fruits by color 'red' so the use user can filter by 'color=red' but the user will still be able to enter anything like 'abc' and press enter, and it will appear as one of filter values.

My issue is that I want to disable user input, I don't want the user to enter 'abc', I need to disable custom inputs and ask the user to choose from the provided values only.

ahmedibrahim92 commented 10 months ago

@nuke-ellington image

You can see in above image, I defined categories (Color) but I can't enforce the user to use only values from the defined categories, he is still can add anything else like symbols, Arabic letters, .... so I need to disable custom text edit.

You can try it from here: https://stackblitz.com/edit/stackblitz-starters-1ugusw

nuke-ellington commented 10 months ago

I think we cannot disable the input of those controls. That would kind of go against their whole design. I see two options here:

  1. Expect that the user enters somewhat useful search terms (if they enter letters from a different alphabet it is their fault)
  2. Work with another component (e.g. dropdown) or a combonation of more than one select maybe? Example Color: <ix-select /> Type: <ix-select />