I have a list of elements that have: id, name and priority, those elements are shown in the interface, where 1 is the highest priority.
I can add any element to this list, and I can choose the priority, by default I show the next value according to the last one inserted, but if the user chooses a priority that already is there, I need to update the other ones priority, for example, I have ten elements with priority 1 to 10 and I create a new one and I choose priority 3, the current three must change to 4 and so one, so the lowest priority would be 11 now (it was ten before)
Has anyone done somthing similar?