flavorly / vanilla-components

A lightweight, flexible & customizable UI library for Vue 3, styled with Tailwind CSS.

Home Page:https://vanilla-components.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RichSelect fetch-endpoint set selected

mferenc79 opened this issue · comments

Hi, amazing project.
RichSelect default value is loaded but not selected.
Can you help me what I did wrong?

                <RichSelect
                    v-model="zipId"
                    :fetch-endpoint="testUrl"
                    value-attribute="id"
                    text-attribute="name"
                    :minimum-input-length="3"
                >

                </RichSelect>

Route::get('/fetch-users', function(Request $request){
return ResolveRichSelectOptions::for(User::class, ['name', 'id']);
})->middleware('web')->name('api.fetch-users');

Are you sure that your zipId is the same value as the its being returned on the v-model ? Also String or Number. Please be sure about this, i will test again today and can guide on this issue in case your are unable to figure it out.

it is true that zipId is STRING and the value returned by v-model is a INT, but if zipId is INT, then there is no return value

If this issue is resolved @mferenc79 feel free to re-open it!