@widergy/energy-ui 3.168.0 → 3.169.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [3.169.0](https://github.com/widergy/energy-ui/compare/v3.168.0...v3.169.0) (2026-06-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * custom row component ut select ([#821](https://github.com/widergy/energy-ui/issues/821)) ([1723ad0](https://github.com/widergy/energy-ui/commit/1723ad0527381f7772644a4a46dd6dbf4efdfdaa))
7
+
1
8
  # [3.168.0](https://github.com/widergy/energy-ui/compare/v3.167.1...v3.168.0) (2026-06-18)
2
9
 
3
10
 
@@ -14,6 +14,7 @@
14
14
  | autocompleteProps | object | {} | Additional props to pass to the underlying Material-UI Autocomplete component. |
15
15
  | className | string | | Additional CSS class name for the component container. |
16
16
  | clearable | bool | true | Determines whether a button to clear the current selection should be shown. |
17
+ | CustomRow | elementType | | Custom React component to render each option row. Receives `{ item, isChecked }` as props, where `item` is the option object and `isChecked` indicates if the option is selected. |
17
18
  | dataTestId | string | | Test ID for the main input component. |
18
19
  | disabled | bool | false | Disables the select input. |
19
20
  | disableFilterOptions | bool | false | Disables option filtering, showing all options even when typing in the search field. |
@@ -231,6 +232,40 @@ const ReadOnlyExample = () => {
231
232
  };
232
233
  ```
233
234
 
235
+ ### With Custom Row Renderer
236
+
237
+ ```jsx
238
+ import React, { useState } from 'react';
239
+ import UTSelect from './UTSelect';
240
+
241
+ const options = [
242
+ { name: 'Alice', value: '1', subtitle: 'Admin' },
243
+ { name: 'Bob', value: '2', subtitle: 'Editor' },
244
+ { name: 'Carol', value: '3', subtitle: 'Viewer' }
245
+ ];
246
+
247
+ const MyCustomRow = ({ item, isChecked }) => (
248
+ <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
249
+ <span style={{ fontWeight: isChecked ? 'bold' : 'normal' }}>{item.name}</span>
250
+ <span style={{ color: 'gray', fontSize: 12 }}>{item.subtitle}</span>
251
+ </div>
252
+ );
253
+
254
+ const CustomRowExample = () => {
255
+ const [value, setValue] = useState(null);
256
+
257
+ return (
258
+ <UTSelect
259
+ CustomRow={MyCustomRow}
260
+ onChange={setValue}
261
+ options={options}
262
+ placeholder="Select a user"
263
+ value={value}
264
+ />
265
+ );
266
+ };
267
+ ```
268
+
234
269
  ### With Search Term Handling
235
270
 
236
271
  ```jsx
@@ -0,0 +1,13 @@
1
+ import { ArgTypes, Canvas, Description, Meta, Title } from '@storybook/blocks';
2
+
3
+ import * as UTSelectV1Stories from './UTSelectV1.stories.js';
4
+
5
+ <Meta of={UTSelectV1Stories} />
6
+
7
+ <Title>UTSelect V1</Title>
8
+
9
+ <Description of={UTSelectV1Stories} />
10
+
11
+ <Canvas of={UTSelectV1Stories.Playground} withToolbar />
12
+
13
+ <ArgTypes exclude={['classes']} />