@salutejs/plasma-new-hope 0.141.0-canary.1422.10737462879.0 → 0.141.0-canary.1422.10773738088.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -296,8 +296,8 @@ type Items = Array<{
296
296
  Свойство alwaysOpened позволяет отображать Combobox всегда открытым. При этом closeAfterSelect игнорируется.
297
297
 
298
298
  ```tsx live
299
- import React from 'react';
300
- import { Combobox } from '@salutejs/{{ package }}';
299
+ import React, { useState } from 'react';
300
+ import { Combobox, Button } from '@salutejs/{{ package }}';
301
301
 
302
302
  export function App() {
303
303
  const items = [
@@ -324,12 +324,13 @@ type Items = Array<{
324
324
  return (
325
325
  <div style=\{{ height: '300px' }}>
326
326
  <div style=\{{width: '300px'}}>
327
+ <Button text={ alwaysOpened ? 'По умолчанию' : 'Всегда открыт' } onClick={() => setAlwaysOpened(!alwaysOpened)} style={{ marginBottom: '1rem' }} />
327
328
  <Combobox
328
329
  items={items}
329
330
  placeholder="Placeholder"
330
331
  label="Label"
331
332
  helperText="Helper text"
332
- alwaysOpened
333
+ alwaysOpened={alwaysOpened}
333
334
  />
334
335
  </div>
335
336
  </div>