Comments (8)
I can work on this
from wireui.
Hello, what do you think about using "without-error", "errorless"? Has any suggestions?
In soon I'll implement it
from wireui.
I like either of those options. leaning more towards errorless,,, but that's just my opinion.
from wireui.
This feature is now done. Enjoy WireUI @greenspace10
from wireui.
will be this issue on radios/checkboxes?
from wireui.
Unfortunately as @donatiss has pointed out, this only appears to apply to the input component.
Easiest solution was to publish the view assets and then anywhere that used $errors->has($name)
or similar, add !$attributes->has('errorless') &&
before, e.g.
<div>
<label for="{{ $id }}" class="flex items-center {{ !$attributes->has('errorless') && $errors->has($name) ? 'text-negative-600':'' }}">
<div class="relative flex items-start">
@if ($leftLabel)
<div class="mr-2 text-sm text-right">
<x-dynamic-component
:component="WireUi::component('label')"
class=""
:for="$id"
:label="$leftLabel"
:has-error="!$attributes->has('errorless') && $errors->has($name)"
/>
@if($description)
<div class="text-gray-500">{{ $description }}</div>
@endif
</div>
@endif
<div class="flex items-center h-5">
<input {{ $attributes->class([
$getClasses(!$attributes->has('errorless') && $errors->has($name)),
])->merge([
'type' => 'checkbox',
]) }} />
</div>
@if ($label)
<div class="ml-2 text-sm">
<x-dynamic-component
:component="WireUi::component('label')"
class=""
:for="$id"
:label="$label"
:has-error="!$attributes->has('errorless') && $errors->has($name)"
/>
@if($description)
<div id="{{ $id }} . comments-description" class="text-gray-500">{{ $description }}</div>
@endif
</div>
@endif
</div>
</label>
@if (!$attributes->has('errorless') && $name)
<x-dynamic-component
:component="WireUi::component('error')"
:name="$name"
/>
@endif
</div>
from wireui.
@itepifanio @greenspace10 Can anyone tell me this only applied for <x-input>
? For checkboxes and radio buttons it not working right?
from wireui.
Unfortunately as @donatiss has pointed out, this only appears to apply to the input component.
Easiest solution was to publish the view assets and then anywhere that used
$errors->has($name)
or similar, add!$attributes->has('errorless') &&
before, e.g.<div> <label for="{{ $id }}" class="flex items-center {{ !$attributes->has('errorless') && $errors->has($name) ? 'text-negative-600':'' }}"> <div class="relative flex items-start"> @if ($leftLabel) <div class="mr-2 text-sm text-right"> <x-dynamic-component :component="WireUi::component('label')" class="" :for="$id" :label="$leftLabel" :has-error="!$attributes->has('errorless') && $errors->has($name)" /> @if($description) <div class="text-gray-500">{{ $description }}</div> @endif </div> @endif <div class="flex items-center h-5"> <input {{ $attributes->class([ $getClasses(!$attributes->has('errorless') && $errors->has($name)), ])->merge([ 'type' => 'checkbox', ]) }} /> </div> @if ($label) <div class="ml-2 text-sm"> <x-dynamic-component :component="WireUi::component('label')" class="" :for="$id" :label="$label" :has-error="!$attributes->has('errorless') && $errors->has($name)" /> @if($description) <div id="{{ $id }} . comments-description" class="text-gray-500">{{ $description }}</div> @endif </div> @endif </div> </label> @if (!$attributes->has('errorless') && $name) <x-dynamic-component :component="WireUi::component('error')" :name="$name" /> @endif </div>
@gRoberts84 If i want to use this for checkboxes or radio buttons should i manually configure that erroless attribute for those inputs in published config files?
from wireui.
Related Issues (20)
- Love WireUI, dreaming of some new features :D HOT 3
- icon 'academic-cap' in dark mode shows white background
- V2 Multi Select with wire:model.live does not react on changes HOT 4
- Problem viewing content below the select component HOT 2
- V2 - View [components.outline.x] not found. HOT 2
- V2 laggy and slow on chrome without hardware acceleration
- [V2] Unable to locate some components HOT 2
- Link to Docs is broken on md
- Alpine Expression Error: wireui_modal is not defined Expression: "wireui_modal({ show: false, model: JSON.parse(atob('eyJuYW1lIjoibW9kZWwiLCJkaXJlY3RpdmUiOiJ3aXJlOm1vZGVsLmRlZmVyIiwidmFsdWUiOiJjcmVhdGVNb2RhbCJ9')) })" HOT 2
- toggle element click event hitbox error HOT 1
- Search in async-search is not working on views
- Select component rendered, but dropdown list not showing up HOT 3
- Docs: When I type a phone number into x-phone, I get a bracket HOT 2
- Add custom row and column properties to textarea
- How pass parameters to modal? HOT 5
- Maskable Input : allow regex
- We come back! HOT 1
- Inputs showing touble outlines in Firfox HOT 2
- Datetime picker doesn't get a value
- Default selected value not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wireui.