Skip to content

Trick for emptyInsertThreshold #2034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2021
Merged

Trick for emptyInsertThreshold #2034

merged 3 commits into from
Jun 27, 2021

Conversation

Yopai
Copy link
Contributor

@Yopai Yopai commented May 5, 2021

Hi,

The emptyInsertThreshold is not really needed (at least in recent browsers), as the function can be obtained by a pure css solution.

I propose this in the README - of course you're free to rewrite it and/or put it somewhere else.

Other ideas :

  • Managing automatically an "empty" class when the list is empty (not relying on the :empty which works only if there's no node at all, even text ones)
  • Have an "emptyPadding" option, adding automatically padding on an empty list. Note that the required padding can be bottom and/or right, or even top and/or left

Give a pure-css workaround to emptyInsertThreshold option.
@owen-m1 owen-m1 self-requested a review June 22, 2021 17:14
@owen-m1 owen-m1 merged commit 101b92e into SortableJS:master Jun 27, 2021
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.

2 participants