Skip to content

Conversation

@dHIM24
Copy link
Contributor

@dHIM24 dHIM24 commented Jul 23, 2025

  • Добавлен props checkmarkPosition, позволяющий управлять положением чекбокса в "Выбрать всё"

Чек лист

  • Задача сформулирована и описана в JIRA
  • В названии ветки есть айдишник задачи в JIRA (fix/DS-1234), ссылку прикреплять не надо
  • У реквеста осмысленное название feat(...) или fix(...) по conventional commits (https://www.conventionalcommits.org)
  • Код покрыт тестами и протестирован в различных браузерах
  • Добавленные пропсы добавлены в демки и описаны в документации
  • К реквесту добавлен changeset

Если есть визуальные изменения

  • Прикреплено изображение было/стало
2025-07-24.00.17.57.mov

@changeset-bot
Copy link

changeset-bot bot commented Jul 23, 2025

🦋 Changeset detected

Latest commit: 7f1db78

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@alfalab/core-components-select Minor
@alfalab/core-components Minor
@alfalab/core-components-custom-picker-button Patch
@alfalab/core-components-input-autocomplete Patch
@alfalab/core-components-international-phone-input Patch
@alfalab/core-components-intl-phone-input Patch
@alfalab/core-components-picker-button Patch
@alfalab/core-components-select-with-tags Patch
@alfalab/core-components-table Patch
@alfalab/core-components-tabs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dHIM24
Copy link
Contributor Author

dHIM24 commented Jul 23, 2025

const OPTIONS = [
    { key: '1', content: 'Neptunium' },
    { key: '2', content: 'Plutonium' },
    { key: '3', content: 'Americium' },
    { key: '4', content: 'Curium' },
    { key: '5', content: 'Berkelium' },
    { key: '6', content: 'Californium' },
    { key: '7', content: 'Einsteinium' },
    { key: '8', content: 'Fermium' },
];

render(() => {
    const [selectedFirst, setSelectedFirst] = React.useState([]);

    return (
        <div style={{ width: 320 }}>
            <Select
                allowUnselect={true}
                size={56}
                placeholder='Выберите элементы'
                label='Множественный выбор'
                Option={BaseOption}
                multiple={true}
                block={true}
                 optionProps={{
                       checkmarkPosition: 'before' 
                 }}
                {...useSelectWithApply({
                    options: OPTIONS,
                    checkmarkPosition: 'after',
                    showHeaderWithSelectAll: true,
                    selected: selectedFirst,
                    onChange: ({ selectedMultiple }) => {
                        setSelectedFirst(selectedMultiple.map((option) => option.key));
                    },
                })}
            />
        </div>
    );
});

@github-actions
Copy link
Contributor

github-actions bot commented Jul 23, 2025

Собрана новая демка.

@coveralls
Copy link

coveralls commented Jul 23, 2025

Pull Request Test Coverage Report for Build 19614830628

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 79.705%

Totals Coverage Status
Change from base Build 19334456547: -0.002%
Covered Lines: 9668
Relevant Lines: 11364

💛 - Coveralls

})}
>
<Checkbox
className={cn({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

положение чекбокса скорее должно быть частью API Checkbox, а не исправляться здесь стилями.

и в самом Checkbox рисовать чекбокс условно, чтобы не полагаться на flex

checkmarkPosition === 'before' && <checkmark /> <content /> checkmarkPosition === 'after' && <checkmark /> 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынес доработку в #1958

@dHIM24 dHIM24 marked this pull request as draft August 4, 2025 09:56
@github-actions
Copy link
Contributor

Demo build

https://core-ds.github.io/core-components/1789

@dHIM24 dHIM24 force-pushed the DS-8308 branch 5 times, most recently from ea9ba89 to ef74cc9 Compare November 5, 2025 09:19
@dHIM24 dHIM24 force-pushed the DS-8308 branch 2 times, most recently from 4f0e5c9 to 2878cd4 Compare November 17, 2025 07:24
@fulcanellee fulcanellee self-requested a review November 19, 2025 05:48
@dHIM24 dHIM24 requested a review from Oladii November 19, 2025 09:32
@dHIM24 dHIM24 force-pushed the DS-8308 branch 5 times, most recently from b795bce to 32d6150 Compare November 21, 2025 07:00
@dHIM24 dHIM24 force-pushed the DS-8308 branch 7 times, most recently from cd4fe30 to 9433e50 Compare November 23, 2025 15:48
@dHIM24 dHIM24 marked this pull request as ready for review November 23, 2025 17:32
@dHIM24 dHIM24 changed the title feat(select): добавлен props, позволяющий управлять положением чекбокса [DS-8308] fix(select): добавлен props, позволяющий управлять положением чекбокса [DS-8308] Dec 22, 2025
@dHIM24 dHIM24 marked this pull request as draft December 29, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants