Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented (?) border for input on focus in multiselect. #685

Open
davidahmed opened this issue May 5, 2024 · 3 comments
Open

Undocumented (?) border for input on focus in multiselect. #685

davidahmed opened this issue May 5, 2024 · 3 comments

Comments

@davidahmed
Copy link

davidahmed commented May 5, 2024

I am using the version on the repo README with slight modifications as follows:

<script>
  import Select from 'svelte-select';

  const items = [
    {value: 'chocolate', label: 'Chocolate', group: 'Sweet'},
    {value: 'pizza', label: 'Pizza', group: 'Savory'},
    {value: 'cake', label: 'Cake', group: 'Sweet', selectable: false},
    {value: 'chips', label: 'Chips', group: 'Savory'},
    {value: 'ice-cream', label: 'Ice Cream', group: 'Sweet'}
  ];

  const groupBy = (item) => item.group;
</script>

<Select {items} {groupBy}
	multiple={true}
	closeListOnChange={false}
	--multi-item-color="red"
	--multi-select-input-margin="20px"
	--multi-select-input-padding="20px"/>

I have tried debugging as much as I could but I can't figure out what is leaving these blue borders for the input field as show below.

Screenshot 2024-05-05 at 18 01 58

I have tried to isolate things as much as possible, but fyi, my project uses tailwind.

@Fabiote2003
Copy link

I had the same problem, I am looking for a solution

@filipkyn
Copy link

filipkyn commented Oct 19, 2024

@davidahmed @Fabiote2003

Ola guys, I somehow fix it. You need to overwrite tailwind selector.

Try this one.

<Select class="svelte-select" items={availableClasses} bind:value={selectedClasses} on:change={handleClassChange} multiple on:clear={handleClassClear} containerStyles="border-radius: 0px;" placeholder="Select tyre classes..." />

<style> :global(.svelte-select input[type='text']:focus) { --tw-ring-color: transparent !important; } </style>

image

@Fabiote2003
Copy link

Yes, I found that solution. It worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants