@flusys/ng-ui 8.1.2 → 8.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -256,7 +256,13 @@ Native single-select dropdown with filtering. Selector: `f-select`.
256
256
  <f-select [options]="countries" optionLabel="name" optionValue="code" [(ngModel)]="selectedCountry" [filter]="true" [placeholder]="'form.selectCountry' | translate" />
257
257
  ```
258
258
 
259
- Key inputs: `options`, `optionLabel`, `optionValue`, `placeholder`, `disabled`, `filter`, `showClear`, `loading`, `invalid`, `touched`, `editable`, `appendTo` (`self | body`). Outputs: `onFilter`, `onChange`, `onShow`, `onHide`, `onBlur`. Supports `fTemplate="selectedItem"` / `fTemplate="item"` content templates.
259
+ Key inputs: `options`, `optionLabel`, `optionValue`, `placeholder`, `disabled`, `filter`, `lazy`, `selectedObject`, `showClear`, `loading`, `invalid`, `touched`, `editable`, `appendTo` (`self | body`). Outputs: `onFilter`, `onChange`, `onShow`, `onHide`, `onBlur`, `onLazyLoad`. Supports `fTemplate="selectedItem"` / `fTemplate="item"` content templates.
260
+
261
+ **Lazy/search edit forms — `selectedObject`:** when `[lazy]="true"` or `[filter]="true"` is combined with a server-paged/searched `options()` list, the page currently loaded may not contain the option matching the bound value (e.g. editing a record whose selected item isn't in the first lazy page). Pass the full entity being edited via `[selectedObject]` and the component pins it into the option pool (deduped by `optionValue`, only while it actually matches the current value) so the trigger label, checkmark and list row always resolve correctly:
262
+
263
+ ```html
264
+ <f-select [options]="users()" optionLabel="name" optionValue="id" [lazy]="true" (onLazyLoad)="loadUsers($event)" [selectedObject]="editingUser()" [(ngModel)]="managerId" />
265
+ ```
260
266
 
261
267
  ### MultiSelectComponent
262
268
 
@@ -266,7 +272,13 @@ Multi-value select with chip/comma display. Selector: `f-multiselect`.
266
272
  <f-multiselect [options]="roles" optionLabel="name" [(ngModel)]="selectedRoles" display="chip" [showToggleAll]="true" />
267
273
  ```
268
274
 
269
- Key inputs: `options`, `optionLabel`, `optionValue`, `placeholder`, `filter`, `display` (`comma | chip`), `maxSelectedLabels`, `selectionLimit`, `showToggleAll`, `invalid`, `touched`, `appendTo` (`self | body`).
275
+ Key inputs: `options`, `optionLabel`, `optionValue`, `placeholder`, `filter`, `lazy`, `selectedObjects`, `display` (`comma | chip`), `maxSelectedLabels`, `selectionLimit`, `showToggleAll`, `invalid`, `touched`, `appendTo` (`self | body`).
276
+
277
+ **Lazy/search edit forms — `selectedObjects`:** same problem as `f-select` but for every currently selected value — pass the full entities (e.g. the record's already-selected roles) via `[selectedObjects]` so chips never silently vanish when the lazy/filtered `options()` page doesn't include them:
278
+
279
+ ```html
280
+ <f-multiselect [options]="roles()" optionLabel="name" optionValue="id" [lazy]="true" (onLazyLoad)="loadRoles($event)" [selectedObjects]="editingUser().roles" [(ngModel)]="roleIds" />
281
+ ```
270
282
 
271
283
  ### CheckboxComponent
272
284
 
@@ -470,15 +482,17 @@ Key inputs: `options` (`TreeNode[]`), `placeholder`, `disabled`, `filter`, `sele
470
482
 
471
483
  ### IconFieldComponent / InputIconComponent
472
484
 
473
- Positions an icon inside a text input (search boxes, etc.) via content projection. Selectors: `f-iconfield`, `f-inputicon`.
485
+ Positions an icon inside a text input (search boxes, etc.). Selectors: `f-iconfield`, `f-inputicon`.
474
486
 
475
487
  ```html
476
488
  <f-iconfield>
477
- <f-inputicon><ui-icon name="search" /></f-inputicon>
489
+ <f-inputicon icon="search" />
478
490
  <input fInputText [placeholder]="'shared.search' | translate" />
479
491
  </f-iconfield>
480
492
  ```
481
493
 
494
+ `f-inputicon`'s `icon` input renders the icon at a fixed 17px regardless of ambient font-size, so it always aligns with the field — prefer it over projecting a manually-sized `<ui-icon>` as content. Content projection (`<f-inputicon><ui-icon .../></f-inputicon>`) still works for cases needing a non-Lucide icon or custom template.
495
+
482
496
  ### FloatLabelComponent
483
497
 
484
498
  Floats a `<label>` above the input on focus/fill. Selector: `f-floatlabel`.
@@ -1246,7 +1260,7 @@ Renders a Lucide icon by name, with PrimeIcons-style aliases mapped internally f
1246
1260
  <ui-icon name="check-circle" [size]="20" [spin]="false" />
1247
1261
  ```
1248
1262
 
1249
- Key inputs: `name`, `size` (default `16`), `spin`, `fill`.
1263
+ Key inputs: `name`, `size` (unset by default — renders at `1em`, scaling with whatever font-size context, e.g. a Tailwind `text-*` class, surrounds it; pass a number to pin an exact pixel size instead), `spin`, `fill`.
1250
1264
 
1251
1265
  ### EditorComponent
1252
1266